Package jmav.component

Examples of jmav.component.GestoreImpostazioni


 
  @Test
  public void testRimuoviIdSmellValido() throws Exception {
    try
    {
      GestoreImpostazioni gestoreImpostazioni = new GestoreImpostazioni();
      gestoreImpostazioni.aggiungiSmell(GestoreImpostazioni.LargeClass);
      assertTrue(true);
      assertEquals(1, gestoreImpostazioni.listaSmell().size());
      assertEquals("LargeClass", gestoreImpostazioni.listaSmell().get(0).getName());
      gestoreImpostazioni.rimuoviSmell(GestoreImpostazioni.LargeClass);
      assertTrue(true);
      assertEquals(0, gestoreImpostazioni.listaSmell().size());
    } catch(ValueNotFoundException e) {
      assertTrue(false);
    }
  }
View Full Code Here


 
  @Test
  public void testListaSmell() throws Exception {
    try
    {
      GestoreImpostazioni gestoreImpostazioni = new GestoreImpostazioni();
      gestoreImpostazioni.aggiungiSmell(GestoreImpostazioni.LargeClass);
      gestoreImpostazioni.aggiungiSmell(GestoreImpostazioni.LongParameterList);
      gestoreImpostazioni.aggiungiSmell(GestoreImpostazioni.LongMethod);
      assertTrue(true);
      assertEquals(3, gestoreImpostazioni.listaSmell().size());
      assertEquals("LargeClass", gestoreImpostazioni.listaSmell().get(0).getName());
      assertEquals("LongParameterList", gestoreImpostazioni.listaSmell().get(1).getName());
      assertEquals("LongMethod", gestoreImpostazioni.listaSmell().get(2).getName());
    } catch(ValueNotFoundException e) {
      assertTrue(false);
    }
  }
View Full Code Here

 
  @Test
  public void testListaSoglieIdSmellNull() throws Exception {
    try
    {
      GestoreImpostazioni gestoreImpostazioni = new GestoreImpostazioni();
      gestoreImpostazioni.listaSoglie(null);
      assertTrue(false);
    } catch(ParameterNotNullException e) {
      assertTrue(true);
    }
  }
View Full Code Here

 
  @Test
  public void testListaSoglieIdSmellNonValido() throws Exception {
    try
    {
      GestoreImpostazioni gestoreImpostazioni = new GestoreImpostazioni();
      gestoreImpostazioni.listaSoglie(4);
      assertTrue(false);
    } catch(ValueNotFoundException e) {
      assertTrue(true);
    }
  }
View Full Code Here

 
  @Test
  public void testListaSoglieIdSmellValido() throws Exception {
    try
    {
      GestoreImpostazioni gestoreImpostazioni = new GestoreImpostazioni();
      gestoreImpostazioni.aggiungiSmell(GestoreImpostazioni.LargeClass);
      assertTrue(true);
      assertEquals(1, gestoreImpostazioni.listaSoglie(GestoreImpostazioni.LargeClass).size());
      assertEquals(Integer.MAX_VALUE, gestoreImpostazioni.listaSoglie(GestoreImpostazioni.LargeClass).get(0).intValue());
    } catch(ValueNotFoundException e) {
      assertTrue(false);
    }
  }
View Full Code Here

 
  @Test
  public void testGetSogliaIdSmellNUll() throws Exception {
    try
    {
      GestoreImpostazioni gestoreImpostazioni = new GestoreImpostazioni();
      gestoreImpostazioni.getSoglia(null, 1);
      assertTrue(false);
    } catch(ParameterNotNullException e) {
      assertTrue(true);
    }
  }
View Full Code Here

 
  @Test
  public void testGetSogliaIdSmellNonValido() throws Exception {
    try
    {
      GestoreImpostazioni gestoreImpostazioni = new GestoreImpostazioni();
      gestoreImpostazioni.getSoglia(4, 1);
      assertTrue(false);
    } catch(ValueNotFoundException e) {
      assertTrue(true);
    }
  }
View Full Code Here

 
  @Test
  public void testGetSogliaIdSmellValidoAndIdSogliaNull() throws Exception {
    try
    {
      GestoreImpostazioni gestoreImpostazioni = new GestoreImpostazioni();
      gestoreImpostazioni.aggiungiSmell(GestoreImpostazioni.LargeClass);
      gestoreImpostazioni.getSoglia(GestoreImpostazioni.LargeClass, null).intValue();
      assertTrue(false);
    } catch(ParameterNotNullException e) {
      assertTrue(true);
    }
  }
View Full Code Here

 
  @Test
  public void testGetSogliaIdSmellValidoAndIdSogliaNonValida() throws Exception {
    try
    {
      GestoreImpostazioni gestoreImpostazioni = new GestoreImpostazioni();
      gestoreImpostazioni.aggiungiSmell(GestoreImpostazioni.LargeClass);
      gestoreImpostazioni.getSoglia(GestoreImpostazioni.LargeClass, 2).intValue();
      assertTrue(false);
    } catch(ValueNotFoundException e) {
      assertTrue(true);
    }
  }
View Full Code Here

 
  @Test
  public void testGetSogliaIdSmellValidoAndIdSogliaValida() throws Exception {
    try
    {
      GestoreImpostazioni gestoreImpostazioni = new GestoreImpostazioni();
      gestoreImpostazioni.aggiungiSmell(GestoreImpostazioni.LargeClass);
      assertTrue(true);
      assertEquals(Integer.MAX_VALUE, gestoreImpostazioni.getSoglia(GestoreImpostazioni.LargeClass, 1).intValue());
    } catch(ValueNotFoundException e) {
      assertTrue(false);
    }
  }
View Full Code Here

TOP

Related Classes of jmav.component.GestoreImpostazioni

Copyright © 2018 www.massapicom. 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.