@Test public void When_Name_Method_Not_Found_Throws_Exception() { try { robot = new RobotBuilder() .test(Providers.class) .onMethod("notFound") .build(); fail(); } catch (RuntimeException e) { assertThat(e.getMessage(), is("When checking Providers no method with " + "name notFound was found.\n")); } }
public static Build test(Class<?> providersClass) { return new Build(providersClass); }