public static Result runTheoryClass(Class<?> testClass) throws InitializationError { Runner theoryRunner = new Theories(testClass); Request request = Request.runner(theoryRunner); return new JUnitCore().run(request); }
@Test public void theoryClassMethodsShowUp() throws Exception { assertThat(new Theories(HasAFailingTheory.class).getDescription() .getChildren().size(), is(1)); }
@Test public void shouldRejectSuppliersWithUnknownConstructors() throws Exception { expected.expect(InitializationError.class); new Theories(TestClassUsingSupplierWithUnknownConstructor.class); }
@Test public void shouldRejectSuppliersWithTwoConstructors() throws Exception { expected.expect(InitializationError.class); new Theories(TestClassUsingSupplierWithTwoConstructors.class); }
@Test public void shouldAcceptSuppliersWithTestClassConstructor() throws Exception { new Theories(TestClassUsingSupplierWithTestClassConstructor.class); }
@Test public void theoryClassMethodsShowUp() throws Exception { assertThat(new Theories(HasATheory.class).getDescription() .getChildren().size(), is(1)); }