Example #1
0
        public void ConcatenatePublicPropertiesToString()
        {
            var test     = new TestDto();
            var tostring = test.PropertiesToString();

            tostring.ShouldBe("A: AVal -- B: 1");
        }
Example #2
0
        public void ThrowForWrongCast()
        {
            object obj = new TestDto();

            Action action = () => { obj.To <string>(); };

            action.ShouldThrow <InvalidCastException>();
        }
Example #3
0
        public void CastToT()
        {
            object obj = new TestDto();

            obj.To <TestDto>().GetType().ShouldBe(typeof(TestDto));
        }