コード例 #1
0
        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"}));
        }
コード例 #2
0
        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" }));
        }
コード例 #3
0
 public void Test42EnumerableFailedBecauseOfValue()
 {
     var source = new ObjectWithComplexItems();
     source.Items.Select(x => x.Zdeferred).Wait().ThatNunit(Is.EqualTo(new[] {"42"}));
 }
コード例 #4
0
 public void Test42EnumerableFailedBecauseNotLazy()
 {
     var source = new ObjectWithComplexItems();
     source.Items.ToArray().Select(x => x.Ydeferred).Wait().ThatNunit(Is.EqualTo(new[] {"42", "42", "42"}));
 }
コード例 #5
0
 public void Test42EnumerableOk()
 {
     var source = new ObjectWithComplexItems();
     source.Items.Select(x => x.Ydeferred).Wait().ThatNunit(Is.EqualTo(new[] {"42", "42", "42"}));
 }
コード例 #6
0
 public void Test42SingleFaild()
 {
     var source = new ObjectWithComplexItems();
     source.Items.Wait().Single(x => x.Xdeferred.Assert(Is.EqualTo("42")), Helper.AssertionConfiguration);
 }
コード例 #7
0
        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"));
        }
コード例 #8
0
        public void Test42SingleFaild()
        {
            var source = new ObjectWithComplexItems();

            source.Items.Wait().Single(x => x.Xdeferred.GetValue().Should().Be("42", "answer is 42"), Helper.AssertionConfiguration);
        }