public void UserIdTest() { // Test that the service returns the same value as that of a direct call // to the thread current principal string userId1 = Thread.CurrentPrincipal.Identity.Name; string userId2 = MembershipManagementService.UserId(true); Assert.IsTrue(userId1 == userId2, $"Error: {userId2} was returned when {userId1} was expected"); }