public void ConcatenatePublicPropertiesToString() { var test = new TestDto(); var tostring = test.PropertiesToString(); tostring.ShouldBe("A: AVal -- B: 1"); }
public void ThrowForWrongCast() { object obj = new TestDto(); Action action = () => { obj.To <string>(); }; action.ShouldThrow <InvalidCastException>(); }
public void CastToT() { object obj = new TestDto(); obj.To <TestDto>().GetType().ShouldBe(typeof(TestDto)); }