public void LastOrDefaultWithConditionButNoMatchingData()
        {
            DataProducer <int> subject = new DataProducer <int>();
            IFuture <int>      first   = subject.LastOrDefault(x => x > 5);

            subject.ProduceAndEnd(3, 4);
            Assert.AreEqual(0, first.Value);
        }
        public void LastOrDefaultWithDataAndCondition()
        {
            DataProducer <int> subject = new DataProducer <int>();
            IFuture <int>      last    = subject.LastOrDefault(x => x % 2 == 0);

            subject.ProduceAndEnd(3, 4, 5, 6, 7);
            Assert.AreEqual(6, last.Value);
        }
        public void LastOrDefaultWithoutData()
        {
            DataProducer <int> subject = new DataProducer <int>();
            IFuture <int>      last    = subject.LastOrDefault();

            subject.End();
            Assert.AreEqual(0, last.Value);
        }
        public void LastOrDefaultWithData()
        {
            DataProducer <int> subject = new DataProducer <int>();
            IFuture <int>      last    = subject.LastOrDefault();

            subject.ProduceAndEnd(3, 4, 5, 6, 7);
            Assert.AreEqual(7, last.Value);
        }
 public void LastOrDefaultWithConditionButNoMatchingData()
 {
     DataProducer<int> subject = new DataProducer<int>();
     IFuture<int> first = subject.LastOrDefault(x => x > 5);
     subject.ProduceAndEnd(3, 4);
     Assert.AreEqual(0, first.Value);
 }
 public void LastOrDefaultWithoutData()
 {
     DataProducer<int> subject = new DataProducer<int>();
     IFuture<int> last = subject.LastOrDefault();
     subject.End();
     Assert.AreEqual(0, last.Value);
 }
 public void LastOrDefaultWithDataAndCondition()
 {
     DataProducer<int> subject = new DataProducer<int>();
     IFuture<int> last = subject.LastOrDefault(x => x % 2 == 0);
     subject.ProduceAndEnd(3, 4, 5, 6, 7);
     Assert.AreEqual(6, last.Value);
 }
 public void LastOrDefaultWithData()
 {
     DataProducer<int> subject = new DataProducer<int>();
     IFuture<int> last = subject.LastOrDefault();
     subject.ProduceAndEnd(3, 4, 5, 6, 7);
     Assert.AreEqual(7, last.Value);
 }