예제 #1
0
        public void ToString_ReturnString()
        {
            // Act
            var obj = HtmlId.Create(value);

            // Assert
            Assert.Equal($@"{name}=""{value}""", obj.ToString());
        }
예제 #2
0
        public void Equals_Null()
        {
            // Arrange
            var orig = HtmlId.Create(value);

            // Assert
            Assert.False(orig.Equals(null));
        }
예제 #3
0
        public void Equals_OtherObject()
        {
            // Arrange
            var orig = HtmlId.Create(value);
            var str  = $@"{name}=""{value}""";

            // Assert
            Assert.False(orig.Equals(str));
        }
예제 #4
0
        public void Equals_IsNotEqual()
        {
            // Arrange
            var orig  = HtmlId.Create(value);
            var other = HtmlId.Create("not same");

            // Assert
            Assert.False(orig.Equals(other));
        }
예제 #5
0
        public void Equals_IsEqual()
        {
            // Arrange
            var orig = HtmlId.Create(value);
            var copy = HtmlId.Create(value);

            // Assert
            Assert.True(orig.Equals(copy));
        }
예제 #6
0
        public void Create_ReturnNewInstance()
        {
            // Act
            var obj = HtmlId.Create(value);

            // Assert
            Assert.Equal(name, obj.Name);
            Assert.Equal(value, obj.Value);
            Assert.IsType <HtmlId>(obj);
        }