Ejemplo n.º 1
0
        public void Ctor_Intializes_All_Properties()
        {
            var identifier = new Model.Identifier("dns", "www.example.com");
            var sut        = new HttpModel.Identifier(identifier);

            Assert.Equal(identifier.Type, sut.Type);
            Assert.Equal(identifier.Value, sut.Value);
        }
Ejemplo n.º 2
0
        public void Ctor_Normalizes_All_Properties()
        {
            var type  = " DNS ";
            var value = " www.EXAMPLE.com ";

            var sut = new Model.Identifier(type, value);

            Assert.Equal("dns", sut.Type);
            Assert.Equal("www.example.com", sut.Value);
        }
Ejemplo n.º 3
0
        public Identifier(Model.Identifier model)
        {
            if (model is null)
            {
                throw new System.ArgumentNullException(nameof(model));
            }

            Type  = model.Type;
            Value = model.Value;
        }
Ejemplo n.º 4
0
        public void Ctor_Populates_All_Properties()
        {
            var type  = "dns";
            var value = "www.example.com";

            var sut = new Model.Identifier(type, value);

            Assert.Equal(type, sut.Type);
            Assert.Equal(value, sut.Value);
            Assert.False(sut.IsWildcard);
        }
Ejemplo n.º 5
0
        public void Ctor_Populates_All_Properties()
        {
            var type       = "custom:error";
            var detail     = "detail";
            var identifier = new Model.Identifier("dns", "www.example.com");

            var sut = new Model.AcmeError(type, detail, identifier);

            Assert.Equal(type, sut.Type);
            Assert.Equal(detail, sut.Detail);
            Assert.Equal(identifier, sut.Identifier);
        }
Ejemplo n.º 6
0
        public void Ctor_Sets_Wildcard()
        {
            var sut = new Model.Identifier("dns", "*.example.com");

            Assert.True(sut.IsWildcard);
        }