Exemple #1
0
        public void testGetUserTypeIdentifierWithUnknownType()
        {
            var ctx = new SafeConfigurablePofContext();

            Assert.IsTrue(ctx.GetUserTypeIdentifier(typeof(NestedType))
                          == SafeConfigurablePofContext.TYPE_PORTABLE);

            // COH-5584: repeat the test to verify that NestedType is now
            // cached in ConfigurablePofContext.
            Assert.IsTrue(ctx.GetUserTypeIdentifier(typeof(NestedType))
                          == SafeConfigurablePofContext.TYPE_PORTABLE);
        }
Exemple #2
0
        public void testGetUserTypeIdentifierWithUnknownObject()
        {
            var ctx = new SafeConfigurablePofContext();

            Assert.IsTrue(ctx.GetUserTypeIdentifier(new NestedType())
                          == SafeConfigurablePofContext.TYPE_PORTABLE);
        }
Exemple #3
0
        public void testGetUserTypeIdentifierWithUnknownTypeName()
        {
            var ctx = new SafeConfigurablePofContext();

            Assert.IsTrue(ctx.GetUserTypeIdentifier(typeof(NestedType).AssemblyQualifiedName)
                          == SafeConfigurablePofContext.TYPE_PORTABLE);
        }
Exemple #4
0
        public void testGetUserTypeIdentifierWithPofObject()
        {
            var ctx = new SafeConfigurablePofContext();

            ctx.GetUserTypeIdentifier(new HashDictionary());
        }
Exemple #5
0
        public void testGetUserTypeIdentifierWithNullObject()
        {
            var ctx = new SafeConfigurablePofContext();

            ctx.GetUserTypeIdentifier((object)null);
        }
Exemple #6
0
        public void testGetUserTypeIdentifierWithKnownTypeName()
        {
            var ctx = new SafeConfigurablePofContext();

            Assert.IsTrue(ctx.GetUserTypeIdentifier(typeof(Exception).AssemblyQualifiedName) == 0);
        }
Exemple #7
0
        public void testGetUserTypeIdentifierWithPofTypeName()
        {
            var ctx = new SafeConfigurablePofContext();

            ctx.GetUserTypeIdentifier(typeof(HashDictionary).AssemblyQualifiedName);
        }
Exemple #8
0
        public void testGetUserTypeIdentifierWithNullTypeName()
        {
            var ctx = new SafeConfigurablePofContext();

            ctx.GetUserTypeIdentifier((String)null);
        }
Exemple #9
0
        public void testGetUserTypeIdentifierWithPofType()
        {
            var ctx = new SafeConfigurablePofContext();

            ctx.GetUserTypeIdentifier(typeof(HashDictionary));
        }