private int CastToInt <T>(T source) { return(Cast <T, int> .With(source)); }
private string CastToString <T>(T source) { return(Cast <T, string> .With(source)); }
public void Cast_WithInvalidCast_ThrowsException() { Assert.Throws <TypeInitializationException>(() => Cast <int, CastTests> .With(1)); }