Beispiel #1
0
        static void TestUserRepo()
        {
            IUserRepository repo = new UserDbRepository();

            Assert.IsTrue(repo.FindOne("test1", "test1"));
            Assert.IsFalse(repo.FindOne("test0", "test0"));
            int i = 1;

            foreach (var user in repo.FindAll())
            {
                Console.WriteLine(user.ToString());
                Assert.IsTrue(user.Name.Contains("test" + i));
                Assert.IsTrue(user.Password.Contains("test" + i));
                Assert.AreEqual(user.Name, user.Password);
                i++;
            }
        }