public void notNull_tests() { IEnumerable <User> users; IEnumerable <int> ints; users = Sources .getUsersWithNulls() .notNull(); ints = Sources .getInts() .notNull(); Assert.AreEqual(4, users.Count()); Assert.AreEqual(10, ints.Count()); }
public void push_tests() { IList <User> users; users = Sources.getUsers().ToList(); users.push(new User { Age = 89, Name = "Pepe", SurName = "Fernandez González", Registration = new DateTime(2019, 1, 1), }); Assert.AreEqual(5, users.Count); Assert.ThrowsException <ArgumentException>(() => Sources.getInts().ToArray().push(4)); }