public void IsAssignableFrom() { TypeDelegator td = new TypeDelegator(typeof(int)); Assert.AreEqual(true, typeof(int).IsAssignableFrom(td)); Assert.AreEqual(false, typeof(string).IsAssignableFrom(td)); Assert.AreEqual(true, td.IsAssignableFrom(typeof(int))); Assert.AreEqual(false, td.IsAssignableFrom(typeof(string))); }
public void IsAssignableFrom() { TypeDelegator td = new TypeDelegator(typeof(int)); Assert.True(typeof(int).IsAssignableFrom(td)); Assert.False(typeof(string).IsAssignableFrom(td)); Assert.True(td.IsAssignableFrom(typeof(int))); Assert.False(td.IsAssignableFrom(typeof(string))); }