@Test public void assertIsNone_throwAssertionError_whenSome() { thrown.expect(AssertionError.class); thrown.expectMessage(startsWith("Option was not None")); new OptionAssertion<String>(Option.ofObj("value")).assertIsNone(); }
public void assertIsNone() { if (!actual.isNone()) { throw fail("Option was not None"); } }
OptionAssertion { public void assertIsNone() { if (!actual.isNone()) { throw fail("Option was not None"); } } }
OptionAssertion { public void assertIsNone() { if (!actual.isNone()) { throw fail("Option was not None"); } } OptionAssertion(@NotNull final Option<T> actual); }
OptionAssertion { public void assertIsNone() { if (!actual.isNone()) { throw fail("Option was not None"); } } OptionAssertion(@NotNull final Option<T> actual); void assertIsNone(); @NotNull OptionAssertion<T> assertIsSome(); @NotNull OptionAssertion<T> assertValue(@NotNull final T expected); @NotNull OptionAssertion<T> assertValue(@NotNull final Func1<T, Boolean> predicate); }
OptionAssertion { public void assertIsNone() { if (!actual.isNone()) { throw fail("Option was not None"); } } OptionAssertion(@NotNull final Option<T> actual); void assertIsNone(); @NotNull OptionAssertion<T> assertIsSome(); @NotNull OptionAssertion<T> assertValue(@NotNull final T expected); @NotNull OptionAssertion<T> assertValue(@NotNull final Func1<T, Boolean> predicate);  }