public void ElementAtOrDefaultOutsideRange() { DataProducer <string> subject = new DataProducer <string>(); IFuture <string> result = subject.ElementAtOrDefault(5); subject.ProduceAndEnd("zero", "one", "two", "three", "four"); Assert.IsNull(result.Value); }
public void ElementAtOrDefaultWithinRange() { DataProducer <string> subject = new DataProducer <string>(); IFuture <string> result = subject.ElementAtOrDefault(2); subject.ProduceAndEnd("zero", "one", "two", "three", "four"); Assert.AreEqual("two", result.Value); }
public void ElementAtOrDefaultOutsideRange() { DataProducer<string> subject = new DataProducer<string>(); IFuture<string> result = subject.ElementAtOrDefault(5); subject.ProduceAndEnd("zero", "one", "two", "three", "four"); Assert.IsNull(result.Value); }
public void ElementAtOrDefaultWithinRange() { DataProducer<string> subject = new DataProducer<string>(); IFuture<string> result = subject.ElementAtOrDefault(2); subject.ProduceAndEnd("zero", "one", "two", "three", "four"); Assert.AreEqual("two", result.Value); }