public void TestGetAllUsers() { Repos<User> repos = new Repos<User>(); List<User> us = new List<User>(); for (int i = 0; i < 5; i++) { us.Add(new User(i, "Name" + i)); repos.Save(new User(i, "Name" + i)); } foreach (User u in repos.GetAll()) { Console.WriteLine(u); } var n = 0; foreach (User s in repos.GetAll()) { Assert.AreEqual(us[n].Id, s.Id); Assert.AreEqual(us[n].Username, s.Username); n++; } }