public async Task DeleteUserProfileByAccountId_UserProfileExists_ReturnsNull(int accountId) { // Arrange IUserProfileRepository userProfile = new UserProfileRepository(new SQLServerGateway(), new ConnectionStringData()); // Act await userProfile.DeleteUserProfileByAccountId(accountId); var retrievedAccount = await userProfile.GetUserProfileByAccountId(accountId); // Assert Assert.IsNull(retrievedAccount); }
public async Task DeleteUserProfileByAccountId_UserProfileExists_ExecutionTimeLessThan400Milliseconds(int accountId, long expectedMaxExecutionTime) { // Arrange IUserProfileRepository userProfile = new UserProfileRepository(new SQLServerGateway(), new ConnectionStringData()); // Act var timer = Stopwatch.StartNew(); await userProfile.DeleteUserProfileByAccountId(accountId); timer.Stop(); var actualExecutionTime = timer.ElapsedMilliseconds; Debug.WriteLine("Actual Execution Time: " + actualExecutionTime); // Assert Assert.IsTrue(actualExecutionTime <= expectedMaxExecutionTime); }