Exemplo n.º 1
0
        public virtual void TestEnumResolverUsingInterface()
        {
            CodeResolverRegistry.RegisterResolver(typeof(MockCharacters), new EnumBasedCodeResolver(typeof(MockEnum)));
            MockCharacters fred = CodeResolverRegistry.Lookup <MockCharacters>(MOCK_CHARACTERS_TYPE, "FRED");

            Assert.IsNotNull(fred, "fred");
            Assert.AreEqual(MockEnum.FRED, fred, "fred");
        }
Exemplo n.º 2
0
        public virtual void TestEnumResolver()
        {
            CodeResolverRegistry.RegisterResolver(typeof(MockEnum), new EnumBasedCodeResolver(typeof(MockEnum)));
            MockEnum fred = CodeResolverRegistry.Lookup <MockEnum>(MOCK_ENUM_TYPE, "FRED");

            Assert.IsNotNull(fred, "fred");
            Assert.AreEqual(MockEnum.FRED, fred, "fred");
        }