예제 #1
0
        public void PartiallyLabeledTryParseTest(string label, PartiallyLabeled expected, bool canParse)
        {
            bool canParsed = EnumLabel.TryParse <PartiallyLabeled>(label, out PartiallyLabeled result);

            Assert.Equal(expected, result);
            Assert.Equal(canParse, canParsed);
        }
예제 #2
0
        public void DuplicatedLabelTryParseTest(string label, DuplicatedLabel expected, bool canParse)
        {
            bool canParsed = EnumLabel.TryParse <DuplicatedLabel>(label, out DuplicatedLabel result);

            Assert.Equal(canParse, canParsed);
            Assert.Equal(expected, result);
        }
예제 #3
0
        public void TryParseTest(string argument, EnumWithAttribute value, bool canParse)
        {
            bool isSuccess = EnumLabel.TryParse(argument, out EnumWithAttribute result);

            Assert.Equal(canParse, isSuccess);

            Assert.Equal(value, result);
        }