public void UniqueNameCollection_Get_ReturnNull() { var hello = new Order("hello"); var world = new Order("world"); var orders = new List<Order>() { hello, world }; var uniqueNameCollection = new UniqueNameCollection<Order>(orders); var result = uniqueNameCollection.Get("test"); Assert.True(result == null); }
public void UniqueNameCollection_Get_ReturnMatch() { var hello = new Order("hello"); var world = new Order("world"); var orders = new List<Order>() { hello , world}; var uniqueNameCollection = new UniqueNameCollection<Order>(orders); var result = uniqueNameCollection.Get(world.Name); Assert.True(ReferenceEquals(result, world)); }
public void UniqueNameCollection_Get_ReturnNull() { var hello = new Order("hello"); var world = new Order("world"); var orders = new List <Order>() { hello, world }; var uniqueNameCollection = new UniqueNameCollection <Order>(orders); var result = uniqueNameCollection.Get("test"); Assert.True(result == null); }
public void UniqueNameCollection_Get_ReturnMatch() { var hello = new Order("hello"); var world = new Order("world"); var orders = new List <Order>() { hello, world }; var uniqueNameCollection = new UniqueNameCollection <Order>(orders); var result = uniqueNameCollection.Get(world.Name); Assert.True(ReferenceEquals(result, world)); }