Examples of calcolaMatrica()


Examples of jmav.component.CalcolatoreMetriche.calcolaMatrica()

  @Test
  public void testCalcoloMetricaMetricaNull() throws Exception {
    try
    {
      CalcolatoreMetriche calcolatoreMetriche = new CalcolatoreMetriche();
      calcolatoreMetriche.calcolaMatrica(null, UtilTest.getClasse(LOCTest.ClassWith2LinesOfCode));
      assertTrue(false);
    } catch(ParameterNotNullException e) {
      assertTrue(true);
    }
  }
View Full Code Here

Examples of jmav.component.CalcolatoreMetriche.calcolaMatrica()

  @Test
  public void testCalcoloMetricaMetricaNotNullAndPositionNull() throws Exception {
    try
    {
      CalcolatoreMetriche calcolatoreMetriche = new CalcolatoreMetriche();
      calcolatoreMetriche.calcolaMatrica(Metrica.LOC, null);
      assertTrue(false);
    } catch(ParameterNotNullException e) {
      assertTrue(true);
    }
  }
View Full Code Here

Examples of jmav.component.CalcolatoreMetriche.calcolaMatrica()

  @Test
  public void testCalcoloMetricaMetricaNotNullAndPositionNotNull() throws Exception {
    try
    {
      CalcolatoreMetriche calcolatoreMetriche = new CalcolatoreMetriche();
      calcolatoreMetriche.calcolaMatrica(Metrica.LOC, UtilTest.getClasse(LOCTest.ClassWith2LinesOfCode));
      assertTrue(true);
    } catch(ParameterNotNullException e) {
      assertTrue(false);
    }
  }
View Full Code Here

Examples of jmav.component.CalcolatoreMetriche.calcolaMatrica()

    Posizione posizione = UtilTest.getClasse(ClassWith2LinesOfCode);
    assertNotNull(posizione);
    System.out.println("\n\nposizione: "+posizione.getNode());
   
    CalcolatoreMetriche calcolatoreMetriche = new CalcolatoreMetriche();
    Double linesOfCode = calcolatoreMetriche.calcolaMatrica(Metrica.LOC, posizione);
    System.out.println("linesOfCode: "+linesOfCode);
    assertEquals(2.0, linesOfCode);
  }
 
  // CASO 2: Metodo con 2 linee di codice (solo la dichiarazione)
View Full Code Here

Examples of jmav.component.CalcolatoreMetriche.calcolaMatrica()

    Posizione posizione = UtilTest.getMetodo(MethodWith2LinesOfCode);
    assertNotNull(posizione);
    System.out.println("\n\nposizione: "+posizione.getNode());
   
    CalcolatoreMetriche calcolatoreMetriche = new CalcolatoreMetriche();
    Double linesOfCode = calcolatoreMetriche.calcolaMatrica(Metrica.LOC, posizione);
    System.out.println("linesOfCode: "+linesOfCode);
    assertEquals(2.0, linesOfCode);
  }
 
  // CASO 3: Classe con N linee di codice senza commenti
View Full Code Here

Examples of jmav.component.CalcolatoreMetriche.calcolaMatrica()

    Posizione posizione = UtilTest.getClasse(ClassWithNLinesOfCodeWithoutComment);
    assertNotNull(posizione);
    System.out.println("\n\nposizione: "+posizione.getNode());
   
    CalcolatoreMetriche calcolatoreMetriche = new CalcolatoreMetriche();
    Double linesOfCode = calcolatoreMetriche.calcolaMatrica(Metrica.LOC, posizione);
    System.out.println("linesOfCode: "+linesOfCode);
    assertEquals(5.0, linesOfCode);
  }

  // CASO 4: Classe con N linee di codice con commento singola linea
View Full Code Here

Examples of jmav.component.CalcolatoreMetriche.calcolaMatrica()

    Posizione posizione = UtilTest.getClasse(ClassWithNLinesOfCodeSingleLineComment);
    assertNotNull(posizione);
    System.out.println("\n\nposizione: "+posizione.getNode());
   
    CalcolatoreMetriche calcolatoreMetriche = new CalcolatoreMetriche();
    Double linesOfCode = calcolatoreMetriche.calcolaMatrica(Metrica.LOC, posizione);
    System.out.println("linesOfCode: "+linesOfCode);
    assertEquals(3.0, linesOfCode);
  }
 
  // CASO 5: Classe con N linee di codice con commento multi linea
View Full Code Here

Examples of jmav.component.CalcolatoreMetriche.calcolaMatrica()

    Posizione posizione = UtilTest.getClasse(ClassWithNLinesOfCodeMultiLineComment);
    assertNotNull(posizione);
    System.out.println("\n\nposizione: "+posizione.getNode());
   
    CalcolatoreMetriche calcolatoreMetriche = new CalcolatoreMetriche();
    Double linesOfCode = calcolatoreMetriche.calcolaMatrica(Metrica.LOC, posizione);
    System.out.println("linesOfCode: "+linesOfCode);
    assertEquals(3.0, linesOfCode);
  }
 
  // CASO 6: Metodo con N linee di codice senza commenti
View Full Code Here

Examples of jmav.component.CalcolatoreMetriche.calcolaMatrica()

    Posizione posizione = UtilTest.getMetodo(MethodWithNLinesOfCodeWithoutComment);
    assertNotNull(posizione);
    System.out.println("\n\nposizione: "+posizione.getNode());
   
    CalcolatoreMetriche calcolatoreMetriche = new CalcolatoreMetriche();
    Double linesOfCode = calcolatoreMetriche.calcolaMatrica(Metrica.LOC, posizione);
    System.out.println("linesOfCode: "+linesOfCode);
    assertEquals(3.0, linesOfCode);
  }

  // CASO 7: Metodo con N linee di codice con commento singola linea
View Full Code Here

Examples of jmav.component.CalcolatoreMetriche.calcolaMatrica()

    Posizione posizione = UtilTest.getMetodo(MethodWithNLinesOfCodeSingleLineComment);
    assertNotNull(posizione);
    System.out.println("\n\nposizione: "+posizione.getNode());
   
    CalcolatoreMetriche calcolatoreMetriche = new CalcolatoreMetriche();
    Double linesOfCode = calcolatoreMetriche.calcolaMatrica(Metrica.LOC, posizione);
    System.out.println("linesOfCode: "+linesOfCode);
    assertEquals(3.0, linesOfCode);
  }
 
  // CASO 8: Metodo con N linee di codice con commento multi linea
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.