public void Auth_ShouldReturnRightUser()
        {
            var users = new TestDbSet<User>();

            users.RegUser("ivan", "ivan");
            users.RegUser("petya", "admin");
            users.RegUser("admin", "admin1");

            var user1 = users.Auth("ivan", "ivan");
            var user2 = users.Auth("petya", "admin");
            var user3 = users.Auth("admin", "admin1");

            Assert.AreEqual(user1.Name, "ivan");
            Assert.AreEqual(user2.Name, "petya");
            Assert.AreEqual(user3.Name, "admin");
        }
        public void RegUser_ShouldAddUser()
        {
            var users = new TestDbSet<User>();
            users.RegUser("ivan", "ivan");

            Assert.AreEqual(users.Count(), 1);
            Assert.AreEqual(users.FirstOrDefault().Name, "ivan");
        }
        public void Auth_ShouldReturnNull_IfWrongPass()
        {
            var users = new TestDbSet<User>();

            users.RegUser("ivan", "ivan");

            var user = users.Auth("ivan", "ad");

            Assert.IsNull(user);
        }