Пример #1
0
        public IRepoUser createFakeRepoUser(Guid wowId, Guid wowId2)
        {
            var wowUser = new User() { Id = wowId, Name = "wow", Password = "******" };
            var wowUser2 = new User() { Id = wowId2, Name = "wow2", Password = "******" };

            var ds = new Dictionary<string, User>() { { "wow", wowUser }, { "wow2", wowUser2 } };

            return new MemoryRepoUser(ds);
        }
Пример #2
0
        public void Authenticate()
        {
            var expecteUser = new User() { Name = "wow", Password = "******" };
            var ds = new Dictionary<string, User>() { { "wow", expecteUser } };
            IRepoUser repo = new MemoryRepoUser(ds);

            var result = repo.Get("wow");

            Assert.AreEqual(expecteUser, result);

        }
Пример #3
0
 public bool Equals(User u)
 {
     return Name == u.Name && Password == u.Password;
 }