Exemple #1
0
        public void ReflectionContext_GetTypeForObject()
        {
            ReflectionContextSubClass rc = new ReflectionContextSubClass();
            TypeInfo typeInfo            = rc.MapType(typeof(int).GetTypeInfo());

            Assert.Equal(typeof(int).GetTypeInfo().Assembly, rc.MapAssembly(typeof(int).GetTypeInfo().Assembly));
            Assert.Equal(typeof(ReflectionContextSubClass).GetTypeInfo(), rc.GetTypeForObject(rc));
        }
        public void ReflectionContext_GetTypeForObject()
        {
            ReflectionContextSubClass rc = new ReflectionContextSubClass();
            TypeInfo typeInfo = rc.MapType(typeof(int).GetTypeInfo());

            Assert.Equal(typeof(int).GetTypeInfo().Assembly, rc.MapAssembly(typeof(int).GetTypeInfo().Assembly));
            Assert.Equal(typeof(ReflectionContextSubClass).GetTypeInfo(), rc.GetTypeForObject(rc));
        }