public void Test42DynamicCount() { var source = new ObjectWithComplexItems(); var result = source.Items .Wait() .Filtered(x => x.Ydeferred.Assert(Is.EqualTo("42"))) .ThatNunit(Has.Length.EqualTo(3)) .GetAsserted(); Assert.That(result, Is.EqualTo(new[] {"42", "42", "42"})); }
public void Test42DynamicCount() { var source = new ObjectWithComplexItems(); var result = source.Items .Wait() .Filtered(x => x.Ydeferred.GetValue().Should().Be("42", "answer is 42")) .ThatFluent(x => x.Should().HaveCount(3)) .GetAsserted(); Assert.That(result, Is.EqualTo(new[] { "42", "42", "42" })); }
public void Test42EnumerableFailedBecauseOfValue() { var source = new ObjectWithComplexItems(); source.Items.Select(x => x.Zdeferred).Wait().ThatNunit(Is.EqualTo(new[] {"42"})); }
public void Test42EnumerableFailedBecauseNotLazy() { var source = new ObjectWithComplexItems(); source.Items.ToArray().Select(x => x.Ydeferred).Wait().ThatNunit(Is.EqualTo(new[] {"42", "42", "42"})); }
public void Test42EnumerableOk() { var source = new ObjectWithComplexItems(); source.Items.Select(x => x.Ydeferred).Wait().ThatNunit(Is.EqualTo(new[] {"42", "42", "42"})); }
public void Test42SingleFaild() { var source = new ObjectWithComplexItems(); source.Items.Wait().Single(x => x.Xdeferred.Assert(Is.EqualTo("42")), Helper.AssertionConfiguration); }
public void Test42EnumerableOk() { var source = new ObjectWithComplexItems(); source.Items.Select(x => x.Ydeferred).Wait().ThatFluent(x => x.Should().Equal(new[] { "42", "42", "42" }, "answer is 42")); }
public void Test42SingleFaild() { var source = new ObjectWithComplexItems(); source.Items.Wait().Single(x => x.Xdeferred.GetValue().Should().Be("42", "answer is 42"), Helper.AssertionConfiguration); }