Package com.sandwich.koan.result.KoanSuiteResult

Examples of com.sandwich.koan.result.KoanSuiteResult.KoanResultBuilder


      public void clearMessages() {
        fail();
      }
    };

    KoanSuiteResult kr = new KoanResultBuilder().build();
    presenter.displayResult(kr);
    assertEquals(4, state[0]);
  }
View Full Code Here


      public void clearMessages() {
        fail();
      }
    };

    KoanSuiteResult kr = new KoanResultBuilder().remainingCases(Arrays.asList(OneFailingKoan.class.getSimpleName())
      ).methodResult(new KoanMethodResult(KoanMethod.getInstance("", OneFailingKoan.class.getDeclaredMethods()[0]),
          "", "")).build();
    presenter.displayResult(kr);
    assertEquals(4, state[0]);
  }
View Full Code Here

      public void displayOneOrMoreFailure(KoanSuiteResult result) {
        fail();
      }
    };

    KoanSuiteResult kr = new KoanResultBuilder().build();
    presenter.displayResult(kr);
    assertEquals(4, state[0]);
  }
View Full Code Here

      public void displayAllSuccess(KoanSuiteResult result) {
        fail();
      }
    };

    KoanSuiteResult kr = new KoanResultBuilder().remainingCases(Arrays.asList(OneFailingKoan.class.getSimpleName())
      ).methodResult(new KoanMethodResult(KoanMethod.getInstance("", OneFailingKoan.class.getDeclaredMethods()[0]),
          "", "")).build();
    presenter.displayResult(kr);
    assertEquals(4, state[0]);
  }
View Full Code Here

public class KoansResultTest {

  @Test
  public void testToString() throws Exception {
    KoanResultBuilder builder = new KoanResultBuilder()
      .remainingCases(Arrays.asList(OneFailingKoan.class.getSimpleName()))
      .methodResult(new KoanMethodResult(KoanMethod.getInstance("", OneFailingKoan.class.getDeclaredMethods()[0]), "msg", "2"))
      .level("1")
      .numberPassing(3);
    KoanSuiteResult result = builder.build();
    String string = result.toString();
    assertTrue(string.contains("1"));
    assertTrue(string.contains("2"));
    assertTrue(string.contains("3"));
    assertTrue(string.contains(OneFailingKoan.class.getSimpleName()));
View Full Code Here

        }else{
          failingSuites.add(name);
        }
      }
    }
    return new KoanResultBuilder()
        .level(level)
        .numberPassing(successfull)
        .totalNumberOfKoanMethods(pathToEnlightenment.getTotalNumberOfKoans())
        .methodResult(failure).passingCases(passingSuites)
        .remainingCases(failingSuites).build();
View Full Code Here

public class KoansResultTest extends CommandLineTestCase {
 
  @Test
  public void testToString() throws Exception {
    KoanResultBuilder builder = new KoanResultBuilder()
      .remainingCases(Arrays.asList(OneFailingKoan.class.getSimpleName()))
      .methodResult(new KoanMethodResult(KoanMethod.getInstance("", OneFailingKoan.class.getDeclaredMethods()[0]), "msg", "2"))
      .level("1")
      .numberPassing(3);
    KoanSuiteResult result = builder.build();
    String string = result.toString();
    assertTrue(string.contains("1"));
    assertTrue(string.contains("2"));
    assertTrue(string.contains("3"));
    assertTrue(string.contains(OneFailingKoan.class.getSimpleName()));
View Full Code Here

TOP

Related Classes of com.sandwich.koan.result.KoanSuiteResult.KoanResultBuilder

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.