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); }
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); }
public Identifier(Model.Identifier model) { if (model is null) { throw new System.ArgumentNullException(nameof(model)); } Type = model.Type; Value = model.Value; }
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); }
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); }
public void Ctor_Sets_Wildcard() { var sut = new Model.Identifier("dns", "*.example.com"); Assert.True(sut.IsWildcard); }