Skip to content

Commit

Permalink
Tidy up some display around Domain users.
Browse files Browse the repository at this point in the history
Displayed appearance should be {domain}\{user} (as per Windows displays),
 not {domain}/{user}

Signed-off-by: Bevan Weiss <[email protected]>
  • Loading branch information
bevanweiss authored and robmen committed Dec 26, 2024
1 parent 8574528 commit c2ff0cc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/test/burn/WixTestTools/UserVerifier.cs
Original file line number Diff line number Diff line change
Expand Up @@ -171,12 +171,12 @@ public static void VerifyUserInformation(string domainName, string userName, boo

Assert.False(null == user, String.Format("User '{0}' was not found under domain '{1}'.", userName, domainName));

Assert.True(passwordNeverExpires == user.PasswordNeverExpires, String.Format("Password Never Expires for user '{0}/{1}' is: '{2}', expected: '{3}'.", domainName, userName, user.PasswordNeverExpires, passwordNeverExpires));
Assert.True(disabled != user.Enabled, String.Format("Disappled for user '{0}/{1}' is: '{2}', expected: '{3}'.", domainName, userName, !user.Enabled, disabled));
Assert.True(passwordNeverExpires == user.PasswordNeverExpires, String.Format("Password Never Expires for user '{0}\\{1}' is: '{2}', expected: '{3}'.", domainName, userName, user.PasswordNeverExpires, passwordNeverExpires));
Assert.True(disabled != user.Enabled, String.Format("Account disabled for user '{0}\\{1}' is: '{2}', expected: '{3}'.", domainName, userName, !user.Enabled, disabled));

DateTime expirationDate = user.AccountExpirationDate.GetValueOrDefault();
bool accountExpired = expirationDate.ToLocalTime().CompareTo(DateTime.Now) <= 0;
Assert.True(passwordExpired == accountExpired, String.Format("Password Expired for user '{0}/{1}' is: '{2}', expected: '{3}'.", domainName, userName, accountExpired, passwordExpired));
Assert.True(passwordExpired == accountExpired, String.Format("Password Expired for user '{0}\\{1}' is: '{2}', expected: '{3}'.", domainName, userName, accountExpired, passwordExpired));
}

/// <summary>
Expand Down Expand Up @@ -349,7 +349,7 @@ private static void IsUserMemberOf(string domainName, string userName, bool shou
if (found != shouldBeMember)
{
missedAGroup = true;
message += String.Format("User '{0}/{1}' is {2} a member of local group '{3}'. \r\n", domainName, userName, found ? String.Empty : "NOT", groupName);
message += String.Format("User '{0}\\{1}' is {2} a member of local group '{3}'. \r\n", domainName, userName, found ? String.Empty : "NOT", groupName);
}
}
catch (System.DirectoryServices.AccountManagement.PrincipalOperationException)
Expand Down

0 comments on commit c2ff0cc

Please sign in to comment.