8000 Adding some MultiUser tests by vineeththomasalex · Pull Request #334 · microsoft/devhomegithubextension · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Jun 5, 2025. It is now read-only.

Adding some MultiUser tests#334

Merged
EricJohnson327 merged 1 commit intomainfrom
user/vineeththomasalex/MultiUserTests
Jan 26, 2024
Merged

Adding some MultiUser tests#334
EricJohnson327 merged 1 commit intomainfrom
user/vineeththomasalex/MultiUserTests

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
@EricJohnson327 EricJohnson327 deleted the user/vineeththomasalex/MultiUserTests branch January 26, 2024 19:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

0