public void EnumerableMoqqerQuery_Where_ExpressionType_GreaterThan_SingleLevel() { var list = new List <Level0> { new Level0() }; var queryable = new EnumerableMoqqerQuery <Level0>(list); var q = queryable.Where(x => x.L1.L2.L3.L4.L5.Decimal > 25); var res = q.FirstOrDefault(); res.Should().BeNull("single level does not have non null references until decimal"); }
public void EnumerableMoqqerQuery_Where_ExpressionType_GreaterThan_AllLevels() { var list = new List <Level0> { AllLevels }; var queryable = new EnumerableMoqqerQuery <Level0>(list); var q = queryable.Where(x => x.L1.L2.L3.L4.L5.Decimal > 25); var res = q.FirstOrDefault(); res.Should().NotBeNull("All Levels has decimal of 100"); }
public void EnumerableMoqqerQuery_Where_ExpressionType_Equal_SingleLevel() { var list = new List <Level0> { new Level0() }; var queryable = new EnumerableMoqqerQuery <Level0>(list); // ReSharper disable once ReplaceWithSingleCallToFirstOrDefault var q = queryable.Where(x => x.L1.L2.L3.L4.L5.Name == "Name"); var res = q.FirstOrDefault(); res.Should().BeNull("as deepest level doesn't even exist"); }
public void EnumerableMoqqerQuery_Where_ExpressionType_Equal_AllLevels_ComaprisonReturnsTrue() { var list = new List <Level0> { AllLevels }; var queryable = new EnumerableMoqqerQuery <Level0>(list); // ReSharper disable once ReplaceWithSingleCallToFirstOrDefault var q = queryable.Where(x => x.L1.L2.L3.L4.L5.Name == "Name"); var res = q.FirstOrDefault(); res.Should().NotBeNull(); }
public void EnumerableMoqqerQuery_Where_ExpressionType_LessThanOrEqual_SingleLevel() { var list = new List <Level0> { new Level0() }; var queryable = new EnumerableMoqqerQuery <Level0>(list); // ReSharper disable once ReplaceWithSingleCallToFirstOrDefault var q = queryable.Where(x => x.L1.L2.L3.L4.L5.Decimal <= 25); var res = q.FirstOrDefault(); res.Should().BeNull("single level."); }