Exemplo n.º 1
0
        public void Facet_adding_Property_ignores_duplicate()
        {
            // ARRANGE

            var facet    = new Facet();
            var property = new FacetProperty();

            facet.AddProperty(property);

            // ACT

            facet.AddProperty(property);

            // ASSERT

            Assert.Equal(property, facet.Properties.Single());
        }
Exemplo n.º 2
0
        public void Facet_rejects_duplicate_property_name()
        {
            // ARRANGE

            var facet = new Facet(string.Empty, new FacetProperty("name"));

            // ACT

            var result = Assert.Throws <InvalidOperationException>(() => facet.AddProperty(new FacetProperty("name")));

            // ASSERT

            Assert.Equal("duplicate property name: name", result.Message);
        }
Exemplo n.º 3
0
        public void Facet_adds_property()
        {
            // ARRANGE

            var facet    = new Facet();
            var property = new FacetProperty();

            // ACT

            facet.AddProperty(property);

            // ASSERT

            Assert.Equal(property, facet.Properties.Single());
        }