Beispiel #1
0
        public void ConvertObjectToObjectUsingObjectConstructor()
        {
            SSN.Reset();
            Assert.Equal(new SSN("123456789"), ConversionService.Convert <SSN>("123456789"));

            Assert.Equal(2, SSN.ConstructorCount);
            Assert.Equal(0, SSN.ToStringCount);
        }
Beispiel #2
0
        public void ConvertObjectToStringUsingToString()
        {
            SSN.Reset();
            Assert.Equal("123456789", ConversionService.Convert <string>(new SSN("123456789")));

            Assert.Equal(1, SSN.ConstructorCount);
            Assert.Equal(1, SSN.ToStringCount);
        }