public void DeleteAppUserByNameTrue() { IAppUserService service = new AppUserService(); const string userName = "******"; bool creationBool = service.CreateAppUser(userName, Password, Salt); bool existBeforeDeletion = service.AppUserExist(userName); bool deletionBool = service.DeleteAppUser(userName); Assert.True(creationBool); Assert.True(existBeforeDeletion); Assert.True(deletionBool); Assert.False(service.AppUserExist(userName)); }
public void AppUserExistByNameTrue() { IAppUserService service = new AppUserService(); const string userName = "******"; //Hardcoded user in DB //todo replace with a mock Assert.True(service.AppUserExist(userName)); }
public void AppUserExistByNameFalse() { IAppUserService service = new AppUserService(); const string userName = "******"; //Hardcoded user in DB //todo replace with a mock Assert.False(service.AppUserExist(userName)); }
public void AppUserExistByIdTrue() { IAppUserService service = new AppUserService(); const int userId = 0; //Hardcoded user in DB //todo replace with a mock Assert.True(service.AppUserExist(userId)); }
public void DeleteAppUserByNameFalse() { IAppUserService service = new AppUserService(); const string userName = "******"; const string falseName = "not docker"; bool creationBool = service.CreateAppUser(userName, Password, Salt); bool existBeforeDeletion = service.AppUserExist(userName); bool deletionBool = service.DeleteAppUser(falseName); Assert.True(creationBool); Assert.True(existBeforeDeletion); Assert.False(deletionBool); Assert.True(service.AppUserExist(userName)); //clean up todo delete when mock is working service.DeleteAppUser(userName); }
public void DeleteAppUserByIdFalse() { IAppUserService service = new AppUserService(); const string userName = "******"; const int falseId = -2; bool creationBool = service.CreateAppUser(userName, Password, Salt); int userId = service.GetAppUserId(userName); bool existBeforeDeletion = service.AppUserExist(userId); bool deletionBool = service.DeleteAppUser(falseId); Assert.True(creationBool); Assert.True(existBeforeDeletion); Assert.False(deletionBool); Assert.True(service.AppUserExist(userName)); Assert.True(service.AppUserExist(userId)); //clean up todo delete when mock is working service.DeleteAppUser(userName); }