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