public void Multiple_Credentials_Multiple() { var sources = new INuGetSource[] { new NuGetSource { Source = "http://foo", Username = "******", Password = "******" }, new NuGetSource { Source = "https://another-feed", Username = "******", Password = "******" }, }; var p = new TeamCityMultipleCredentialProvider(sources); AssertAuth(p, username: "******", password: "******", url: "http://foo"); AssertAuth(p, username: "******", password: "******", url: "http://foo/"); AssertAuth(p, username: "******", password: "******", url: "https://another-feed"); AssertAuth(p, username: null, url: "https://the-other"); }
public void Multiple_Credentials_One() { var source = new NuGetSource { Source = "http://foo", Username = "******", Password = "******" }; var p = new TeamCityMultipleCredentialProvider(new INuGetSource[] { source }); AssertAuth(p, username: "******", password: "******", url: "http://foo"); }
public void Multiple_Empty() { var p = new TeamCityMultipleCredentialProvider(new INuGetSource[0]); AssertAuth(p); }