public void TestAuthenticationOnLogin() { using (var s = new DiskServiceImpl(GetPersistence())) { s.Login("nananana", "blub"); } }
public void TestAuthenticationOnCreateDisk() { using (var s = new DiskServiceImpl(GetPersistence())) { s.Login("nananana", "blub"); var disk = s.CreateDisk(new UserDto { Login = "******", HashedPassword = "******" }, new DiskOptionsDto { BlockSize = 1000, MasterBlockSize = 1000, SerializedFileSystemOptions = new byte[10] }); } }
public void TestLoginFail() { using (var persistence = GetPersistence()) { persistence.CreateUser("bla", "test"); var s = new DiskServiceImpl(persistence); s.Login("bla", "blub"); } }
public void TestRegisterAndLogin() { using (var persistence = GetPersistence()) { var s = new DiskServiceImpl(persistence); s.Register(_userDto.Login, _userDto.HashedPassword); var user = s.Login(_userDto.Login, _userDto.HashedPassword); Assert.IsNotNull(user); } }
public void TestLogin() { using (var persistence = GetPersistence()) { persistence.CreateUser("bla", "blub"); var s = new DiskServiceImpl(persistence); var user = s.Login("bla", "blub"); Assert.AreEqual("bla", user.Login); Assert.AreEqual("blub", user.HashedPassword); } }