예제 #1
0
 static EnumExtensionTests()
 {
     EnumCore.Init(init =>
     {
         init.InitWith <TestEnum>();
         init.InitWith <TestByteEnum>();
         init.InitWith <TestUShortEnum>();
     });
 }
예제 #2
0
        public void IsEnumToRepresenationEqual()
        {
            EnumCoreExtensions.ClearCache();

            EnumCore.Init(cache => cache.InitWith <TestEnum>());

            Assert.Equal("Enum 4", TestEnum.EnumFour.GetRepresentation());

            EnumCore.Init(cache => cache.InitWith <TestUShortEnum>());

            Assert.Equal("Enum 4", TestUShortEnum.EnumFour.GetRepresentation());
        }
예제 #3
0
        public void IsRepresenationToEnumEqual()
        {
            EnumCoreExtensions.ClearCache();

            EnumCore.Init(cache => cache.InitWith <TestEnum>());

            Assert.Equal(TestEnum.EnumFour, "Enum 4".GetEnumFromRepresentation <TestEnum>());

            EnumCore.Init(cache => cache.InitWith <TestUShortEnum>());

            Assert.Equal(TestUShortEnum.EnumFour, "Enum 4".GetEnumFromRepresentation <TestUShortEnum>());
        }
예제 #4
0
 public void Setup()
 {
     EnumCore.Init();
 }
예제 #5
0
 static JsMinifier()
 {
     EnumCore.Init(cache => cache.InitWith <Options>(), false);
 }