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"); }
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"); }