public void SettingsNullShouldThrow()
        {
            // arrange

            // act
            Action result = () => ClientBuilder.FromSettings(null);

            // assert
            Assert.Throws <ArgumentNullException>("settings", result);
        }
        public void SettingsEmptyShouldThrow()
        {
            // arrange
            var settings = new Settings()
            {
                UpdateUrl = null,
            };

            // act
            Action result = () => ClientBuilder.FromSettings(settings);

            // assert
            Assert.Throws <ArgumentNullException>("uriString", result);
        }
        public void SettingsUsernamePasswordShouldReturn()
        {
            // arrange
            var settings = new Settings()
            {
                Username = "******",
                Password = "******",
            };
            var builder = ClientBuilder.FromSettings(settings);

            // act
            var result = builder.Build();

            // assert
            Assert.NotNull(result);
            Assert.Equal("KellyStuard NoIp Docker/1.0 foo", result.DefaultRequestHeaders.UserAgent.ToString());
            Assert.Equal("Basic", result.DefaultRequestHeaders.Authorization.Scheme);
            Assert.Equal(Convert.ToBase64String(Encoding.ASCII.GetBytes("foo:bar")), result.DefaultRequestHeaders.Authorization.Parameter);
        }