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); }
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); }
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); }
public void DuplicatedLabelParseTest(string label, DuplicatedLabel expected, bool canParse) { try { var value = EnumLabel.Parse <DuplicatedLabel>(label); Assert.Equal(expected, value); Assert.True(canParse); } catch { Assert.False(canParse); } }
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); } }
void ReleaseDesignerOutlets() { if (AvailableLanguagesLabel != null) { AvailableLanguagesLabel.Dispose(); AvailableLanguagesLabel = null; } if (AvailableLanguagesTitle != null) { AvailableLanguagesTitle.Dispose(); AvailableLanguagesTitle = null; } if (ChangeLanguageButton != null) { ChangeLanguageButton.Dispose(); ChangeLanguageButton = null; } if (EnumLabel != null) { EnumLabel.Dispose(); EnumLabel = null; } if (EnumTitle != null) { EnumTitle.Dispose(); EnumTitle = null; } if (GreetingTitle != null) { GreetingTitle.Dispose(); GreetingTitle = null; } if (GreetingValue != null) { GreetingValue.Dispose(); GreetingValue = null; } if (LoadedLanguageTitle != null) { LoadedLanguageTitle.Dispose(); LoadedLanguageTitle = null; } if (LoadedLanguageValue != null) { LoadedLanguageValue.Dispose(); LoadedLanguageValue = null; } if (MultilineTitle != null) { MultilineTitle.Dispose(); MultilineTitle = null; } if (MultilineValue != null) { MultilineValue.Dispose(); MultilineValue = null; } if (SingleEnumLabel != null) { SingleEnumLabel.Dispose(); SingleEnumLabel = null; } if (SingleEnumTitle != null) { SingleEnumTitle.Dispose(); SingleEnumTitle = null; } }
public void ParseTest(string argument, EnumWithAttribute expected) { Assert.Equal(expected, EnumLabel.Parse <EnumWithAttribute>(argument)); }