Exemplo n.º 1
0
        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)));
        }
Exemplo n.º 2
0
        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)));
        }
Exemplo n.º 3
0
        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)));
        }