Added missing tests
This commit is contained in:
parent
69fdd98ab3
commit
c4baef8025
@ -172,17 +172,16 @@ public class UserService : IUserService {
|
|||||||
logMsgBuilder.Append($"Attempting to update sub roles for user {userId} ");
|
logMsgBuilder.Append($"Attempting to update sub roles for user {userId} ");
|
||||||
logMsgBuilder.Append($"to delegated user {delegatedUserId}");
|
logMsgBuilder.Append($"to delegated user {delegatedUserId}");
|
||||||
_logger.LogInformation(logMsgBuilder.ToString());
|
_logger.LogInformation(logMsgBuilder.ToString());
|
||||||
if (userId <= 0) {
|
if (userId <= 0)
|
||||||
throw new ArgumentException($"User Id {userId} is not a valid user Id");
|
throw new ArgumentException($"User Id {userId} is not a valid user Id");
|
||||||
} else if (delegatedUserId <= 0) {
|
if (delegatedUserId <= 0)
|
||||||
throw new ArgumentException($"Delegated user Id {delegatedUserId} is not a valid user Id");
|
throw new ArgumentException($"Delegated user Id {delegatedUserId} is not a valid user Id");
|
||||||
} else {
|
|
||||||
string sql = $"update UserSubRole set UserID = {delegatedUserId}, Delegated = 1 where UserID = {userId}";
|
string sql = $"update UserSubRole set UserID = {delegatedUserId}, Delegated = 1 where UserID = {userId}";
|
||||||
|
|
||||||
await _dalService.ExecuteAsync(sql);
|
await _dalService.ExecuteAsync(sql);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
StringBuilder errMsgBuilder = new();
|
StringBuilder errMsgBuilder = new();
|
||||||
errMsgBuilder.Append($"An exception occurred when attempting to update sub roles for user {userId} ");
|
errMsgBuilder.Append($"An exception occurred when attempting to update sub roles for user {userId} ");
|
||||||
@ -196,28 +195,28 @@ public class UserService : IUserService {
|
|||||||
try {
|
try {
|
||||||
_logger.LogInformation($"Attempting to remove delegated roles for OOO user {userId}");
|
_logger.LogInformation($"Attempting to remove delegated roles for OOO user {userId}");
|
||||||
|
|
||||||
if (userId <= 0) {
|
if (userId <= 0)
|
||||||
throw new ArgumentException($"User Id {userId} is not a valid user Id");
|
throw new ArgumentException($"User Id {userId} is not a valid user Id");
|
||||||
} else {
|
if (delegatedUserId <= 0)
|
||||||
StringBuilder queryBuilder = new StringBuilder();
|
throw new ArgumentException($"Delegated user Id {delegatedUserId} is not a valid user Id");
|
||||||
|
|
||||||
queryBuilder.Append("select SubRoleID from OOODelegatedRoles O inner join UserSubRole U ");
|
StringBuilder queryBuilder = new StringBuilder();
|
||||||
queryBuilder.Append("on O.DelegatedSubRoleID = U.UserSubRoleID ");
|
queryBuilder.Append("select SubRoleID from OOODelegatedRoles O inner join UserSubRole U ");
|
||||||
queryBuilder.Append($"where O.UserID = {userId} and Active = 1");
|
queryBuilder.Append("on O.DelegatedSubRoleID = U.UserSubRoleID ");
|
||||||
|
queryBuilder.Append($"where O.UserID = {userId} and Active = 1");
|
||||||
|
|
||||||
List<int> userSubRoleIds = (await _dalService.QueryAsync<int>(queryBuilder.ToString())).ToList();
|
List<int> userSubRoleIds = (await _dalService.QueryAsync<int>(queryBuilder.ToString())).ToList();
|
||||||
|
|
||||||
foreach (int id in userSubRoleIds) {
|
foreach (int id in userSubRoleIds) {
|
||||||
queryBuilder.Clear();
|
queryBuilder.Clear();
|
||||||
queryBuilder.Append($"update UserSubRole set UserID = {userId}, Delegated = 0 ");
|
queryBuilder.Append($"update UserSubRole set UserID = {userId}, Delegated = 0 ");
|
||||||
queryBuilder.Append($"where UserID = {delegatedUserId} and Delegated = 1 ");
|
queryBuilder.Append($"where UserID = {delegatedUserId} and Delegated = 1 ");
|
||||||
queryBuilder.Append($"and SubRoleID in ({string.Join(',', userSubRoleIds)})");
|
queryBuilder.Append($"and SubRoleID in ({string.Join(',', userSubRoleIds)})");
|
||||||
|
|
||||||
await _dalService.ExecuteAsync(queryBuilder.ToString());
|
await _dalService.ExecuteAsync(queryBuilder.ToString());
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
StringBuilder errMsgBuilder = new();
|
StringBuilder errMsgBuilder = new();
|
||||||
errMsgBuilder.Append("An exception occurred when attempting to remove delegated roles for ");
|
errMsgBuilder.Append("An exception occurred when attempting to remove delegated roles for ");
|
||||||
@ -230,20 +229,19 @@ public class UserService : IUserService {
|
|||||||
public async Task<bool> DelegateApprovalsForUser(int userId, int delegatedUserId) {
|
public async Task<bool> DelegateApprovalsForUser(int userId, int delegatedUserId) {
|
||||||
try {
|
try {
|
||||||
_logger.LogInformation($"Attempting to delegate approvals for user {userId} to delegated user {delegatedUserId}");
|
_logger.LogInformation($"Attempting to delegate approvals for user {userId} to delegated user {delegatedUserId}");
|
||||||
if (userId <= 0) {
|
if (userId <= 0)
|
||||||
throw new ArgumentException($"User Id {userId} is not a valid user Id");
|
throw new ArgumentException($"User Id {userId} is not a valid user Id");
|
||||||
} else if (delegatedUserId <= 0) {
|
if (delegatedUserId <= 0)
|
||||||
throw new ArgumentException($"Delegated user Id {delegatedUserId} is not a valid user Id");
|
throw new ArgumentException($"Delegated user Id {delegatedUserId} is not a valid user Id");
|
||||||
} else {
|
|
||||||
StringBuilder queryBuilder = new();
|
StringBuilder queryBuilder = new();
|
||||||
queryBuilder.Append($"update Approval set UserID = {delegatedUserId}, ");
|
queryBuilder.Append($"update Approval set UserID = {delegatedUserId}, ");
|
||||||
queryBuilder.Append($"Delegated = 1 where UserID = {userId} ");
|
queryBuilder.Append($"Delegated = 1 where UserID = {userId} ");
|
||||||
queryBuilder.Append($"and (ItemStatus = {PENDING_ITEM_STATUS} or ItemStatus = {DENITED_ITEM_STATUS})");
|
queryBuilder.Append($"and (ItemStatus = {PENDING_ITEM_STATUS} or ItemStatus = {DENITED_ITEM_STATUS})");
|
||||||
|
|
||||||
await _dalService.ExecuteAsync(queryBuilder.ToString());
|
await _dalService.ExecuteAsync(queryBuilder.ToString());
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
StringBuilder errMsgBuilder = new();
|
StringBuilder errMsgBuilder = new();
|
||||||
errMsgBuilder.Append($"An exception occurred when attempting to delegate approvals for user {userId} ");
|
errMsgBuilder.Append($"An exception occurred when attempting to delegate approvals for user {userId} ");
|
||||||
@ -257,29 +255,30 @@ public class UserService : IUserService {
|
|||||||
try {
|
try {
|
||||||
_logger.LogInformation($"Attempting to remove delegated roles for OOO user {userId}");
|
_logger.LogInformation($"Attempting to remove delegated roles for OOO user {userId}");
|
||||||
|
|
||||||
if (userId <= 0) {
|
if (userId <= 0)
|
||||||
throw new ArgumentException($"User Id {userId} is not a valid user Id");
|
throw new ArgumentException($"User Id {userId} is not a valid user Id");
|
||||||
} else {
|
if (delegatedUserId <= 0)
|
||||||
StringBuilder queryBuilder = new StringBuilder();
|
throw new ArgumentException($"Delegated user Id {delegatedUserId} is not a valid user Id");
|
||||||
|
|
||||||
queryBuilder.Append("select SubRoleID from OOODelegatedRoles O inner join UserSubRole U ");
|
StringBuilder queryBuilder = new StringBuilder();
|
||||||
queryBuilder.Append("on O.DelegatedSubRoleID = U.UserSubRoleID ");
|
|
||||||
queryBuilder.Append($"where O.UserID = {userId} and Active = 1");
|
|
||||||
|
|
||||||
List<int> userSubRoleIds = (await _dalService.QueryAsync<int>(queryBuilder.ToString())).ToList();
|
queryBuilder.Append("select SubRoleID from OOODelegatedRoles O inner join UserSubRole U ");
|
||||||
|
queryBuilder.Append("on O.DelegatedSubRoleID = U.UserSubRoleID ");
|
||||||
|
queryBuilder.Append($"where O.UserID = {userId} and Active = 1");
|
||||||
|
|
||||||
foreach (int id in userSubRoleIds) {
|
List<int> userSubRoleIds = (await _dalService.QueryAsync<int>(queryBuilder.ToString())).ToList();
|
||||||
queryBuilder.Clear();
|
|
||||||
queryBuilder.Append($"update Approval set UserID = {userId}, Delegated = 0 ");
|
|
||||||
queryBuilder.Append($"where UserID = {delegatedUserId} and Delegated = 1 and ");
|
|
||||||
queryBuilder.Append($"(ItemStatus = {PENDING_ITEM_STATUS} or ItemStatus = {DENITED_ITEM_STATUS}) ");
|
|
||||||
queryBuilder.Append($"and SubRoleID in ({string.Join(',', userSubRoleIds)})");
|
|
||||||
|
|
||||||
await _dalService.ExecuteAsync(queryBuilder.ToString());
|
foreach (int id in userSubRoleIds) {
|
||||||
}
|
queryBuilder.Clear();
|
||||||
|
queryBuilder.Append($"update Approval set UserID = {userId}, Delegated = 0 ");
|
||||||
|
queryBuilder.Append($"where UserID = {delegatedUserId} and Delegated = 1 and ");
|
||||||
|
queryBuilder.Append($"(ItemStatus = {PENDING_ITEM_STATUS} or ItemStatus = {DENITED_ITEM_STATUS}) ");
|
||||||
|
queryBuilder.Append($"and SubRoleID in ({string.Join(',', userSubRoleIds)})");
|
||||||
|
|
||||||
return true;
|
await _dalService.ExecuteAsync(queryBuilder.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
StringBuilder errMsgBuilder = new();
|
StringBuilder errMsgBuilder = new();
|
||||||
errMsgBuilder.Append("An exception occurred when attempting to remove delegated roles ");
|
errMsgBuilder.Append("An exception occurred when attempting to remove delegated roles ");
|
||||||
|
@ -74,19 +74,34 @@ public class UserServiceTests {
|
|||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public async Task GetAllActiveOOOUsersShouldReturnMockUsers() {
|
public async Task GetAllExpiredOOOUsersDbErrorShouldThrowException() {
|
||||||
//Arrange
|
_mockDalService.Setup(d => d.QueryAsync<User>(It.IsAny<string>())).ThrowsAsync(new Exception("whoops!"));
|
||||||
|
|
||||||
|
_userService = new UserService(MOCK_LOGGER, _mockDalService.Object);
|
||||||
|
|
||||||
|
Assert.ThrowsAsync<Exception>(async Task() => await _userService.GetAllExpiredOOOUsersAsync());
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public async Task GetAllExpiredOOOUsersShouldReturnMockUsers() {
|
||||||
_mockDalService.Setup(d => d.QueryAsync<User>(It.IsAny<string>())).Returns(Task.FromResult(MOCK_USERS));
|
_mockDalService.Setup(d => d.QueryAsync<User>(It.IsAny<string>())).Returns(Task.FromResult(MOCK_USERS));
|
||||||
|
|
||||||
_userService = new UserService(MOCK_LOGGER, _mockDalService.Object);
|
_userService = new UserService(MOCK_LOGGER, _mockDalService.Object);
|
||||||
|
|
||||||
//Act
|
|
||||||
List<User> users = await _userService.GetAllExpiredOOOUsersAsync();
|
List<User> users = await _userService.GetAllExpiredOOOUsersAsync();
|
||||||
|
|
||||||
//Assert
|
|
||||||
Assert.True(users.Count() == 2);
|
Assert.True(users.Count() == 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public async Task GetAllPendingOOOUsersDbErrorShouldThrowException() {
|
||||||
|
_mockDalService.Setup(d => d.QueryAsync<OOOTemp>(It.IsAny<string>())).ThrowsAsync(new Exception("whoops!"));
|
||||||
|
|
||||||
|
_userService = new UserService(MOCK_LOGGER, _mockDalService.Object);
|
||||||
|
|
||||||
|
Assert.ThrowsAsync<Exception>(async Task () => await _userService.GetAllPendingOOOUsersAsync());
|
||||||
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public async Task GetAllPendingOOOUsersShouldReturnMockOOOTemps() {
|
public async Task GetAllPendingOOOUsersShouldReturnMockOOOTemps() {
|
||||||
_mockDalService.Setup(d => d.QueryAsync<OOOTemp>(It.IsAny<string>())).Returns(Task.FromResult(MOCK_OOO_TEMPS));
|
_mockDalService.Setup(d => d.QueryAsync<OOOTemp>(It.IsAny<string>())).Returns(Task.FromResult(MOCK_OOO_TEMPS));
|
||||||
@ -138,6 +153,15 @@ public class UserServiceTests {
|
|||||||
Assert.False(await _userService.IsDelegatorAlreadyDelegatedTo(0));
|
Assert.False(await _userService.IsDelegatorAlreadyDelegatedTo(0));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public async Task IsDelegatorAlreadyDelegatedToDbErrorShouldThrowException() {
|
||||||
|
_mockDalService.Setup(d => d.QueryAsync<User>(It.IsAny<string>())).ThrowsAsync(new Exception("whoops!"));
|
||||||
|
|
||||||
|
_userService = new UserService(MOCK_LOGGER, _mockDalService.Object);
|
||||||
|
|
||||||
|
Assert.ThrowsAsync<Exception>(async Task() => await _userService.IsDelegatorAlreadyDelegatedTo(2));
|
||||||
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public async Task IsDelegatorAlreadyDelegatedToWithNoUsersShouldReturnFalse() {
|
public async Task IsDelegatorAlreadyDelegatedToWithNoUsersShouldReturnFalse() {
|
||||||
IEnumerable<User> emptyUsers = new List<User>();
|
IEnumerable<User> emptyUsers = new List<User>();
|
||||||
@ -199,21 +223,41 @@ public class UserServiceTests {
|
|||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public async Task UpdateUserSubRolesWithInvalidUserIdShouldThrowException() {
|
public async Task RemoveDelegatedRolesWithInvalidUserIdShouldThrowException() {
|
||||||
|
_userService = new UserService(MOCK_LOGGER, _mockDalService.Object);
|
||||||
|
|
||||||
|
Assert.ThrowsAsync<ArgumentException>(async Task () => await _userService.RemoveDelegatedRoles(0));
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public async Task RemoveDelegatedRolesWithValidUserIdShouldReturnTrue() {
|
||||||
|
_mockDalService.Setup(d => d.ExecuteAsync(It.IsAny<string>())).Returns(Task.FromResult(1));
|
||||||
|
|
||||||
|
_userService = new UserService(MOCK_LOGGER, _mockDalService.Object);
|
||||||
|
|
||||||
|
bool actual = await _userService.RemoveDelegatedRoles(2);
|
||||||
|
|
||||||
|
_mockDalService.Verify(d => d.ExecuteAsync(It.IsAny<string>()));
|
||||||
|
|
||||||
|
Assert.True(actual);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public async Task DelegateUserSubRolesWithInvalidUserIdShouldThrowException() {
|
||||||
_userService = new UserService(MOCK_LOGGER, _mockDalService.Object);
|
_userService = new UserService(MOCK_LOGGER, _mockDalService.Object);
|
||||||
|
|
||||||
Assert.ThrowsAsync<ArgumentException>(async Task () => await _userService.DelegateUserSubRoles(0, 2));
|
Assert.ThrowsAsync<ArgumentException>(async Task () => await _userService.DelegateUserSubRoles(0, 2));
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public async Task UpdateUserSubRolesWithInvalidDelegateIdShouldThrowException() {
|
public async Task DelegateUserSubRolesWithInvalidDelegateIdShouldThrowException() {
|
||||||
_userService = new UserService(MOCK_LOGGER, _mockDalService.Object);
|
_userService = new UserService(MOCK_LOGGER, _mockDalService.Object);
|
||||||
|
|
||||||
Assert.ThrowsAsync<ArgumentException>(async Task () => await _userService.DelegateUserSubRoles(2, 0));
|
Assert.ThrowsAsync<ArgumentException>(async Task () => await _userService.DelegateUserSubRoles(2, 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public async Task UpdateUserSubRolesWithValidUserIdShouldReturnTrue() {
|
public async Task DelegateUserSubRolesWithValidUserIdShouldReturnTrue() {
|
||||||
_mockDalService.Setup(d => d.ExecuteAsync(It.IsAny<string>())).Returns(Task.FromResult(1));
|
_mockDalService.Setup(d => d.ExecuteAsync(It.IsAny<string>())).Returns(Task.FromResult(1));
|
||||||
|
|
||||||
_userService = new UserService(MOCK_LOGGER, _mockDalService.Object);
|
_userService = new UserService(MOCK_LOGGER, _mockDalService.Object);
|
||||||
@ -223,6 +267,32 @@ public class UserServiceTests {
|
|||||||
Assert.True(actual);
|
Assert.True(actual);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public async Task RemoveDelegatedUserSubRolesWithInvalidUserShouldThrowException() {
|
||||||
|
_userService = new UserService(MOCK_LOGGER, _mockDalService.Object);
|
||||||
|
|
||||||
|
Assert.ThrowsAsync<ArgumentException>(async Task () => await _userService.RemoveDelegatedUserSubRoles(0, 2));
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public async Task RemoveDelegateUserSubRolesWithInvalidDelegateIdShouldThrowException() {
|
||||||
|
_userService = new UserService(MOCK_LOGGER, _mockDalService.Object);
|
||||||
|
|
||||||
|
Assert.ThrowsAsync<ArgumentException>(async Task () => await _userService.RemoveDelegatedUserSubRoles(2, 0));
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public async Task RemoveDelegatedUserSubRolesWithValidParamsShouldReturnTrue() {
|
||||||
|
IEnumerable<int> roleIds = new List<int>() {1, 2};
|
||||||
|
|
||||||
|
_mockDalService.Setup(d => d.QueryAsync<int>(It.IsAny<string>())).Returns(Task.FromResult(roleIds));
|
||||||
|
_mockDalService.Setup(d => d.ExecuteAsync(It.IsAny<string>())).Returns(Task.FromResult(1));
|
||||||
|
|
||||||
|
_userService = new UserService(MOCK_LOGGER, _mockDalService.Object);
|
||||||
|
|
||||||
|
Assert.True(await _userService.RemoveDelegatedUserSubRoles(1, 2));
|
||||||
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public async Task DelegateApprovalsForUserWithInvalidUserIdShouldThrowException() {
|
public async Task DelegateApprovalsForUserWithInvalidUserIdShouldThrowException() {
|
||||||
_userService = new UserService(MOCK_LOGGER, _mockDalService.Object);
|
_userService = new UserService(MOCK_LOGGER, _mockDalService.Object);
|
||||||
@ -248,6 +318,32 @@ public class UserServiceTests {
|
|||||||
Assert.True(actual);
|
Assert.True(actual);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public async Task RemoveDelegatedApprovalsForUserWithInvalidUserIdShouldThrowException() {
|
||||||
|
_userService = new UserService(MOCK_LOGGER, _mockDalService.Object);
|
||||||
|
|
||||||
|
Assert.ThrowsAsync<ArgumentException>(async Task () => await _userService.RemoveDelegatedApprovalsForUser(0, 2));
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public async Task RemoveDelegatedApprovalsForUserWithInvalidDelegateIdShouldThrowException() {
|
||||||
|
_userService = new UserService(MOCK_LOGGER, _mockDalService.Object);
|
||||||
|
|
||||||
|
Assert.ThrowsAsync<ArgumentException>(async Task () => await _userService.RemoveDelegatedApprovalsForUser(2, 0));
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public async Task RemoveDelegatedApprovalsForUserWithValidUserIdShouldReturnTrue() {
|
||||||
|
IEnumerable<int> roleIds = new List<int>() { 1, 2 };
|
||||||
|
|
||||||
|
_mockDalService.Setup(d => d.QueryAsync<int>(It.IsAny<string>())).Returns(Task.FromResult(roleIds));
|
||||||
|
_mockDalService.Setup(d => d.ExecuteAsync(It.IsAny<string>())).Returns(Task.FromResult(1));
|
||||||
|
|
||||||
|
_userService = new UserService(MOCK_LOGGER, _mockDalService.Object);
|
||||||
|
|
||||||
|
Assert.True(await _userService.RemoveDelegatedApprovalsForUser(1, 2));
|
||||||
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public async Task FlagUserAsOOOWithNullOOOTempShouldThrowException() {
|
public async Task FlagUserAsOOOWithNullOOOTempShouldThrowException() {
|
||||||
_userService = new UserService(MOCK_LOGGER, _mockDalService.Object);
|
_userService = new UserService(MOCK_LOGGER, _mockDalService.Object);
|
||||||
@ -291,6 +387,22 @@ public class UserServiceTests {
|
|||||||
Assert.False(actual);
|
Assert.False(actual);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public async Task RemoveOOOFlagForUserWithInvalidIdShouldThrowException() {
|
||||||
|
_userService = new UserService(MOCK_LOGGER, _mockDalService.Object);
|
||||||
|
|
||||||
|
Assert.ThrowsAsync<ArgumentException>(async Task () => await _userService.RemoveOOOFlagForUser(0));
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public async Task RemoveOOOFlagForUserWithValidIdShouldReturnTrue() {
|
||||||
|
_mockDalService.Setup(d => d.ExecuteAsync(It.IsAny<string>())).Returns(Task.FromResult(1));
|
||||||
|
|
||||||
|
_userService = new UserService(MOCK_LOGGER, _mockDalService.Object);
|
||||||
|
|
||||||
|
Assert.True(await _userService.RemoveOOOFlagForUser(1));
|
||||||
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public async Task SetOOOTempProcessedWithNullOOOTempShouldThrowException() {
|
public async Task SetOOOTempProcessedWithNullOOOTempShouldThrowException() {
|
||||||
_userService = new UserService(MOCK_LOGGER, _mockDalService.Object);
|
_userService = new UserService(MOCK_LOGGER, _mockDalService.Object);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user