Esempio n. 1
0
 public void TestAuthenticationOnLogin()
 {
     using (var s = new DiskServiceImpl(GetPersistence()))
     {
         s.Login("nananana", "blub");
     }
 }
Esempio n. 2
0
 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] });
     }
 }
Esempio n. 3
0
 public void TestLoginFail()
 {
     using (var persistence = GetPersistence())
     {
         persistence.CreateUser("bla", "test");
         var s = new DiskServiceImpl(persistence);
         s.Login("bla", "blub");
     }
 }
Esempio n. 4
0
 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);
     }
 }
Esempio n. 5
0
 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);
     }
 }