public void FailReturnsExpectedResult() { var sut = new EventCentricTestSpecification(NoEvents, Message, NoEvents); var result = sut.Fail(); Assert.That(result.Specification, Is.SameAs(sut)); Assert.That(result.Passed, Is.False); Assert.That(result.Failed, Is.True); Assert.That(result.Buts, Is.EqualTo(Optional <Exception> .Empty)); Assert.That(result.But, Is.EqualTo(Optional <Exception> .Empty)); }
public void FailReturnsExpectedResult() { var sut = new EventCentricTestSpecification(NoEvents, Message, NoEvents); var result = sut.Fail(); Assert.That(result.Specification, Is.SameAs(sut)); Assert.That(result.Passed, Is.False); Assert.That(result.Failed, Is.True); Assert.That(result.Buts, Is.EqualTo(Optional<Exception>.Empty)); Assert.That(result.But, Is.EqualTo(Optional<Exception>.Empty)); }
public void FailWithActualExceptionReturnsExpectedResult() { var sut = new EventCentricTestSpecification(NoEvents, Message, NoEvents); var actual = new Exception(); var result = sut.Fail(actual); Assert.That(result.Specification, Is.SameAs(sut)); Assert.That(result.Passed, Is.False); Assert.That(result.Failed, Is.True); Assert.That(result.Buts, Is.EqualTo(Optional <Tuple <string, object>[]> .Empty)); Assert.That(result.But, Is.EqualTo(new Optional <Exception>(actual))); }
public void FailWithActualExceptionReturnsExpectedResult() { var sut = new EventCentricTestSpecification(NoEvents, Message, NoEvents); var actual = new Exception(); var result = sut.Fail(actual); Assert.That(result.Specification, Is.SameAs(sut)); Assert.That(result.Passed, Is.False); Assert.That(result.Failed, Is.True); Assert.That(result.Buts, Is.EqualTo(Optional<Tuple<string, object>[]>.Empty)); Assert.That(result.But, Is.EqualTo(new Optional<Exception>(actual))); }
public void FailWithActualEventsReturnsExpectedResult() { var sut = new EventCentricTestSpecification(NoEvents, Message, NoEvents); var actual = new[] {new Fact(Model.Identifier1, new object())}; var result = sut.Fail(actual); Assert.That(result.Specification, Is.SameAs(sut)); Assert.That(result.Passed, Is.False); Assert.That(result.Failed, Is.True); Assert.That(result.ButEvents, Is.EqualTo(new Optional<Fact[]>(actual))); Assert.That(result.ButException, Is.EqualTo(Optional<Exception>.Empty)); }
public void FailWithActualEventsReturnsExpectedResult() { var sut = new EventCentricTestSpecification(NoEvents, Message, NoEvents); var actual = new[] { new Fact(Model.Identifier1, new object()) }; var result = sut.Fail(actual); Assert.That(result.Specification, Is.SameAs(sut)); Assert.That(result.Passed, Is.False); Assert.That(result.Failed, Is.True); Assert.That(result.ButEvents, Is.EqualTo(new Optional <Fact[]>(actual))); Assert.That(result.ButException, Is.EqualTo(Optional <Exception> .Empty)); }
public void FailWithNullExceptionThrows() { var sut = new EventCentricTestSpecification(NoEvents, Message, NoEvents); Assert.Throws <ArgumentNullException>(() => { var _ = sut.Fail((Exception)null); }); }
public void FailWithNullExceptionThrows() { var sut = new EventCentricTestSpecification(NoEvents, Message, NoEvents); Assert.Throws<ArgumentNullException>(() => { var _ = sut.Fail((Exception) null); }); }