public void CanCreateUser() { var preCount = userDbService.Count(); var testUser = new User() { Email = "*****@*****.**", FullName = "Bob Smith", Username = "******" }; userDbService.Create(testUser); Assert.AreEqual(userDbService.Count(),preCount + 1); }
public void CanGetUserById() { var testUser = new User() { Email = "*****@*****.**", FullName = "Frank Nodoby", Username = "******" }; userDbService.Create(testUser); var id = testUser.GetIdAsString(); var retrievedUser = userDbService.GetById(id); Assert.AreEqual(retrievedUser.Email,testUser.Email); Assert.AreEqual(retrievedUser.FullName, testUser.FullName); Assert.AreEqual(retrievedUser.Username, testUser.Username); }
public void CanCreateUser() { var user = new User { AuthenticationType = "basic", Email = "*****@*****.**", FullName = "Me You", Id = new ObjectId(Guid.NewGuid().ToString()), SecurityKey = "MyPassword", TeamIds = new List<ObjectId>(), Username = "******" }; _userDbService.Create(user); }