Example #1
0
        public void ToString_OneProperty_Null()
        {
            // Arrange

            var nulled = new OneProperty <String>(null);

            // Act

            var output = nulled.ToString();

            // Assert

            Assert.Equal("{ Property: null }", output);
        }
Example #2
0
        public void ToString_OneProperty <TProperty>(TProperty value, string expectedValue)
        {
            // Arrange

            var oneProperty = new OneProperty <TProperty>(value);

            // Act

            var actual = oneProperty.ToString();

            // Assert

            Assert.Equal("{ Property: " + expectedValue + " }", actual);
        }
 public void ShouldGenerateStringForOnePropertyObject()
 {
     var value = new OneProperty(1);
     Assert.That(value.ToString(), Is.EqualTo("Value: 1"));
 }