public void Should_throw_an_Exception() { var input = new[] { new TestObject { Value = "A" }, new TestObject { Value = "B" }, }; var result = input.GetByPropertyValueOrIndex(x => x.Value, "2"); result.Value.ShouldBeEqualTo("B"); }
public void Should_throw_an_Exception() { var input = new[] { new TestObject { Value = "3" }, new TestObject { Value = "6" }, }; var result = input.GetByPropertyValueOrIndex(x => x.Value, "6"); result.ShouldBeSameInstanceAs(input[1]); }