Example #1
0
        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");
        }
Example #2
0
        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");
        }
Example #3
0
        public void Multiple_Empty()
        {
            var p = new TeamCityMultipleCredentialProvider(new INuGetSource[0]);

            AssertAuth(p);
        }