public void WhenWrongTypeThenShouldThrowException() { var mapper = new IrrelevantMapper(); Assert.Throws <InvalidCastException>(() => mapper.Map(new object(), new TestClass())); Assert.Throws <InvalidCastException>(() => mapper.Map(new TestClass(), new object())); }
public void WhenMapperDoesNotMapOrIgnoreAllPropertiesThenValidateShouldFail() { var mapper = new IrrelevantMapper(); Assert.Throws <MissingMappingException>(() => mapper.ValidateMapping()); }