Ejemplo n.º 1
0
        public void ConstantElement_ShouldBeValueObject()
        {
            // Given
            var underTest = new ConstantElement(10, typeof(Int32));

            // Then
            AssertHelper.AreEqualByValue(underTest, new ConstantElement(10, typeof(Int32)));
            AssertHelper.AreNotEqualByValue(underTest, new ConstantElement(11, typeof(Int32)));
            AssertHelper.AreNotEqualByValue(underTest, new ConstantElement(10, typeof(Double)));
        }
Ejemplo n.º 2
0
        public void ElementTypeSelector_ShouldBeValueObject()
        {
            // Given
            var underTest = new TypeSelectorElement(
                name: "test",
                attributes: Enumerable.Empty <AttributeElement>(),
                modifiers: Enumerable.Empty <ModifierElement>(),
                classSelectors: Enumerable.Empty <ClassSelectorElement>());

            // Then
            AssertHelper.AreEqualByValue(underTest, new TypeSelectorElement(
                                             "test",
                                             Enumerable.Empty <AttributeElement>(),
                                             Enumerable.Empty <ModifierElement>(),
                                             Enumerable.Empty <ClassSelectorElement>()
                                             ));

            AssertHelper.AreEqualByValue(new TypeSelectorElement(), new TypeSelectorElement());
            AssertHelper.AreNotEqualByValue(underTest, new TypeSelectorElement());
        }