Package org.infinitest

Examples of org.infinitest.InfinitestSettings


import org.junit.*;

public class WhenConfiguringInfinitest {
  @Test
  public void shouldProvideDefaultValues() {
    InfinitestSettings settings = new InfinitestSettings();
    assertTrue(settings.isInfinitestEnabled());
  }
View Full Code Here


  public void canLoadSettingsFromAStream() throws IOException {
    Properties properties = new Properties();
    properties.setProperty(IS_ENABLED, "true");
    ByteArrayOutputStream out = new ByteArrayOutputStream();
    properties.store(out, "");
    InfinitestSettings settings = new InfinitestSettings(new ByteArrayInputStream(out.toByteArray()));
    assertTrue(settings.isInfinitestEnabled());
  }
View Full Code Here

    assertTrue(settings.isInfinitestEnabled());
  }

  @Test
  public void canUpdateSettingsInPlace() {
    InfinitestSettings settings = new InfinitestSettings();
    settings.setIsInfinitestEnabled(false);
    assertFalse(settings.isInfinitestEnabled());
  }
View Full Code Here

    assertFalse(settings.isInfinitestEnabled());
  }

  @Test
  public void canSavePropertiesToAStream() throws IOException {
    InfinitestSettings settings = new InfinitestSettings();
    ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
    settings.saveTo(outputStream);
    Properties properties = new Properties();
    properties.load(new ByteArrayInputStream(outputStream.toByteArray()));
    assertEquals("true", properties.getProperty(IS_ENABLED));
  }
View Full Code Here

TOP

Related Classes of org.infinitest.InfinitestSettings

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.