public void NotRemovedNegative() { var collection = EntityWithIdOfInt.Range(1, 10).ToArray(); collection.AsQueryable().Get(1).MarkAsRemoved(); Assert.IsNull(collection.AsQueryable().NotRemoved().GetOrNull(1)); }
public void GetAnyOf_Partialy() { var array = EntityWithIdOfInt.Range(1, 10).GetAnyOf(1, 2, 300).ToArray(); Assert.AreEqual(2, array.Length); Assert.IsNotNull(array.SingleOrDefault(s => s.Id == 1)); Assert.IsNotNull(array.SingleOrDefault(s => s.Id == 2)); }
public void GetAllOf_Positive() { var array = EntityWithIdOfInt.Range(1, 10).GetAllOf(1, 2, 3).ToArray(); Assert.AreEqual(3, array.Length); Assert.IsNotNull(array.SingleOrDefault(s => s.Id == 1)); Assert.IsNotNull(array.SingleOrDefault(s => s.Id == 2)); Assert.IsNotNull(array.SingleOrDefault(s => s.Id == 3)); }
EntityWithIdOfInt[] CreateTestArray() { var array = EntityWithIdOfInt.Range(1, 10).ToArray(); for (int i = 0; i < 10; i++) { array[i].Created = new DateTime(1990, 01, i); } return(array); }
public void GetIntFail() { EntityWithIdOfInt.Range(1, 10).Get(100); }
public void GetInt() { Assert.AreEqual(2, EntityWithIdOfInt.Range(1, 10).Get(2).Id); }
public void GetAllOf_Negative() { EntityWithIdOfInt.Range(1, 10).GetAllOf(new int[0]); }
public void GetAllOf_Partialy() { var array = EntityWithIdOfInt.Range(1, 10).GetAllOf(1, 2, 300); }
public void GetAnyOf_Negative() { var array = EntityWithIdOfInt.Range(1, 10).GetAnyOf(100, 200, 300).ToArray(); Assert.AreEqual(0, array.Length); }
public void GetIntOrNullFail() { Assert.IsNull(EntityWithIdOfInt.Range(1, 10).GetOrNull(100)); }