Package com.sandwich.koan.suite

Examples of com.sandwich.koan.suite.OnePassingKoan


    }
  }
 
  @Test
  public void testMainMethodWithClassNameArg_qualifiedWithPkgName() throws Throwable {
    stubAllKoans(Arrays.asList(new OnePassingKoan()));
    new CommandLineArgumentRunner().run();
    assertSystemOutContains(Strings.getMessage("passing_suites")+": "+OnePassingKoan.class.getSimpleName());
  }
View Full Code Here


    assertSystemOutContains(Strings.getMessage("passing_suites")+": "+OnePassingKoan.class.getSimpleName());
  }

  @Test
  public void testMainMethodWithClassNameArg_classSimpleName() throws Throwable {
    stubAllKoans(Arrays.asList(new OnePassingKoan()));
    new CommandLineArgumentRunner().run();
    assertSystemOutContains(Strings.getMessage("passing_suites")+": "+OnePassingKoan.class.getSimpleName());
  }
View Full Code Here

    assertSystemOutContains("0/2");
  }
 
  @Test
  public void testGetKoans() throws Exception {
    stubAllKoans(Arrays.asList(new OnePassingKoan()));
    Map<String, Map<String, KoanElementAttributes>> koans = PathToEnlightenment.getPathToEnlightenment().iterator().next().getValue();
    assertEquals(1, koans.size());
    Entry<String, Map<String, KoanElementAttributes>> entry = koans.entrySet().iterator().next();
    assertEquals(OnePassingKoan.class.getName(), entry.getKey());
    assertEqualsOnePassingKoan.class.getDeclaredMethod("koan").toString(),
View Full Code Here

  }

  @Test
  public void testNoWarningFromPlacingExpectationOnRightSide()
      throws Throwable {
    stubAllKoans(Arrays.asList(new OnePassingKoan()));
    Logger.getLogger(CommandLineArgumentRunner.class.getSimpleName()).addHandler(
        new Handler() {
          @Override
          public void close() throws SecurityException {
          }
View Full Code Here

*/
public class AppReadinessForDeploymentTest extends CommandLineTestCase {
 
  @Test
  public void testMainMethodWithClassNameArg_qualifiedWithPkgName() throws Throwable {
    stubAllKoans(Arrays.asList(new OnePassingKoan()));
    new CommandLineArgumentRunner().run();
    assertSystemOutContains(KoanConstants.PASSING_SUITES+" "+OnePassingKoan.class.getSimpleName());
  }
View Full Code Here

    assertSystemOutContains(KoanConstants.PASSING_SUITES+" "+OnePassingKoan.class.getSimpleName());
  }

  @Test
  public void testMainMethodWithClassNameArg_classSimpleName() throws Throwable {
    stubAllKoans(Arrays.asList(new OnePassingKoan()));
    new CommandLineArgumentRunner().run();
    assertSystemOutContains(KoanConstants.PASSING_SUITES+" "+OnePassingKoan.class.getSimpleName());
  }
View Full Code Here

    public void koanTwo(){assertEquals(true, false);}
  }
 
  @Test
  public void testGetKoans() throws Exception {
    stubAllKoans(Arrays.asList(new OnePassingKoan()));
    Map<String, Map<String, KoanElementAttributes>> koans = PathToEnlightenment.getPathToEnlightenment().iterator().next().getValue();
    assertEquals(1, koans.size());
    Entry<String, Map<String, KoanElementAttributes>> entry = koans.entrySet().iterator().next();
    assertEquals(OnePassingKoan.class.getName(), entry.getKey());
    assertEqualsOnePassingKoan.class.getDeclaredMethod("koan").toString(),
View Full Code Here

  }

  @Test
  public void testNoWarningFromPlacingExpecationOnRightSide()
      throws Throwable {
    stubAllKoans(Arrays.asList(new OnePassingKoan()));
    Logger.getLogger(CommandLineArgumentRunner.class.getSimpleName()).addHandler(
        new Handler() {
          @Override
          public void close() throws SecurityException {
          }
View Full Code Here

    assertSystemOutDoesntContain(Strings.getMessage("encouragement"));
  }
 
  @Test
  public void passingSuites() throws Throwable {
    stubAllKoans(Arrays.asList(new OnePassingKoan(), new OnePassingKoanDifferentName()));
    new CommandLineArgumentRunner().run();
    assertSystemOutContains(Strings.getMessage("passing_suites")+": OnePassingKoan, OnePassingKoanDifferentName");
  }
View Full Code Here

    assertSystemOutContains(Strings.getMessage("remaining_suites")+": OneFailingKoan, OneFailingKoanDifferentName");
  }
 
  @Test
  public void failingAndPassingSuites() throws Throwable {
    stubAllKoans(Arrays.asList(new OnePassingKoan(), new OneFailingKoan()));
    new CommandLineArgumentRunner().run();
    assertSystemOutContains(Strings.getMessage("passing_suites")+": OnePassingKoan"+EOL+
        Strings.getMessage("remaining_suites")+": OneFailingKoan");
  }
View Full Code Here

TOP

Related Classes of com.sandwich.koan.suite.OnePassingKoan

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.