Ejemplo n.º 1
0
            public void Build_WithEmptyAudience_HasDefaultValueForAudience()
            {
                _commandLine.Audience = string.Empty;
                var options = ServerOptionBuilder.Build(_commandLine, _permissiveOptions);

                options.Value.Audience.Should().NotBeNullOrEmpty();
            }
Ejemplo n.º 2
0
            public void Build_WithNoConnectionThumbprint_DoesNotReturnValue()
            {
                _commandLine.ConnectionCertificateThumbprint = string.Empty;
                var options = ServerOptionBuilder.Build(_commandLine);

                options.HasValue.Should().BeFalse();
            }
Ejemplo n.º 3
0
            public void Build_WithUnknownConnectionThumbprint_HasErrorForConnection()
            {
                _commandLine.ConnectionCertificateThumbprint = _thumbprint;
                var options = ServerOptionBuilder.Build(_commandLine);

                options.Errors.Should().Contain(e => e.Contains("connection"));
            }
Ejemplo n.º 4
0
            public void Build_WithHttpServerUrl_HasErrorForServerUrl()
            {
                _commandLine.ServerUrl = "http://www.example.com";
                var options = ServerOptionBuilder.Build(_commandLine);

                options.Errors.Should().Contain(e => e.Contains("Server endpoint URL"));
            }
Ejemplo n.º 5
0
            public void WithValidServerUrl_ConfigureServerUrl()
            {
                _commandLine.ServerUrl = "https://example.com/";
                var options = ServerOptionBuilder.Build(_commandLine, _permissiveOptions);

                options.Value.ServerUrl.ToString().Should().Be(_commandLine.ServerUrl);
            }
Ejemplo n.º 6
0
            public void Build_WithEmptyServerUrl_HasErrorForServerUrl()
            {
                _commandLine.ServerUrl = string.Empty;
                var options = ServerOptionBuilder.Build(_commandLine);

                options.Errors.Should().Contain(e => e.Contains("server endpoint URL"));
            }
Ejemplo n.º 7
0
            public void Build_WithExitAfterRequest_ConfiguresValue()
            {
                _commandLine.ExitAfterRequest = true;
                var options = ServerOptionBuilder.Build(_commandLine, _permissiveOptions);

                options.Value.ExitAfterRequest.Should().BeTrue();
            }
Ejemplo n.º 8
0
            public void Build_WithoutExitAfterRequest_ShouldHaveDefault()
            {
                _commandLine.ExitAfterRequest = false;
                var options = ServerOptionBuilder.Build(_commandLine, _permissiveOptions);

                options.Value.ExitAfterRequest.Should().BeFalse();
            }
Ejemplo n.º 9
0
            public void Build_WithEmptyIssuer_HasDefaultValueForIssuer()
            {
                _commandLine.Issuer = string.Empty;
                var options = ServerOptionBuilder.Build(_commandLine, _permissiveOptions);

                options.Value.Issuer.Should().NotBeNullOrEmpty();
            }
Ejemplo n.º 10
0
            public void Build_WithEmptyServerUrl_DoesNotReturnValue()
            {
                var options = ServerOptionBuilder.Build(_commandLine);

                options.HasValue.Should().BeFalse();
            }