public void AsCredentialsItem_WithSpaceOnSourceName_WorksCorrectly() { var credentials = new PackageSourceCredential( "source name", "user", "password", isPasswordClearText: true, validAuthenticationTypesText: null); var expectedItem = new CredentialsItem("source name", "user", "password", isPasswordClearText: true, validAuthenticationTypes: null); SettingsTestUtils.DeepEquals(credentials.AsCredentialsItem(), expectedItem).Should().BeTrue(); }
public void AsCredentialsItem_WithAuthenticationTypes_WorksCorrectly() { var credentials = new PackageSourceCredential( "source", "user", "password", isPasswordClearText: false, validAuthenticationTypesText: "basic, negotiate"); var expectedItem = new CredentialsItem("source", "user", "password", isPasswordClearText: false, validAuthenticationTypes: "basic, negotiate"); SettingsTestUtils.DeepEquals(credentials.AsCredentialsItem(), expectedItem).Should().BeTrue(); }
public void AsCredentialsItem_WithPassword_WorksCorrectly() { var credentials = new PackageSourceCredential( "source", "user", "password", isPasswordClearText: true, validAuthenticationTypesText: null); var expectedItem = new CredentialsItem("source", "user", "password", isPasswordClearText: true, validAuthenticationTypes: null); credentials.AsCredentialsItem().DeepEquals(expectedItem).Should().BeTrue(); }