Esempio n. 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);
        }
Esempio n. 2
0
 public void PartiallyLabeledParseTest(string label, PartiallyLabeled expected, bool canParse)
 {
     try
     {
         var result = EnumLabel.Parse <PartiallyLabeled>(label);
         Assert.Equal(expected, result);
         Assert.True(canParse);
     }
     catch
     {
         Assert.False(canParse);
     }
 }
Esempio n. 3
0
 public void PartiallyLabeledToLabelTest(PartiallyLabeled enumValue, string label)
 {
     //ToLabel
     Assert.Equal(label, enumValue.ToLabelString());
 }