Package jmav.component

Examples of jmav.component.GestoreImpostazioni


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


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

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

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

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

 
  @Test
  public void testModificaSogliaIdSmellValidoAndIdSogliaValida() throws Exception {
    try
    {
      GestoreImpostazioni gestoreImpostazioni = new GestoreImpostazioni();
      gestoreImpostazioni.aggiungiSmell(GestoreImpostazioni.LargeClass);
      assertTrue(true);
      assertEquals(Integer.MAX_VALUE, gestoreImpostazioni.getSoglia(GestoreImpostazioni.LargeClass, 1).intValue());
      gestoreImpostazioni.modificaSoglia(GestoreImpostazioni.LargeClass, 1, 10);
      assertEquals(10, gestoreImpostazioni.getSoglia(GestoreImpostazioni.LargeClass, 1).intValue());
    } catch(ValueNotFoundException e) {
      e.printStackTrace();
      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.