Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding some MultiUser tests #334

Merged
merged 1 commit into from
Jan 26, 2024

Conversation

vineeththomasalex
Copy link
Contributor

@vineeththomasalex vineeththomasalex commented Jan 26, 2024

Summary of the pull request

Adding multiuser test and re-adding credential vault tests removed in #324
 This is a test-only change.

References and relevant issues

#324

Detailed description of the pull request / Additional comments

Validation steps performed

Ran tests locally

PR checklist

  • Closes #xxx
  • Tests added/passed
  • Documentation updated

public void CredentialVault_CreateSingleton()
{
var credentialVault1 = new CredentialVault("DevHomeGitHubExtensionTest");
Assert.IsNotNull(credentialVault1);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: constructor won't return null
** all occurrences **

var credentialVault2 = new CredentialVault("DevHomeGitHubExtensionTest");
Assert.IsNotNull(credentialVault2);

Assert.AreNotEqual(credentialVault1, credentialVault2);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test name CreateSingleton hints that those two should be equal. Consider renaming the unit test or add comments.

Assert.AreEqual(2, result.DeveloperIds.Count());
Assert.AreNotEqual("dummytestuser1", result.DeveloperIds.First().LoginId);
Assert.AreNotEqual("dummytestuser1", result.DeveloperIds.Last().LoginId);
Assert.IsNotNull(new Uri(result.DeveloperIds.First().Url));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider using Assert.DoesNotThrow because Assert.IsNotNull will either pass or its argument will throw an exception.

@EricJohnson327 EricJohnson327 merged commit 6e409a7 into main Jan 26, 2024
4 checks passed
@EricJohnson327 EricJohnson327 deleted the user/vineeththomasalex/MultiUserTests branch January 26, 2024 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants