public TestSmartEnum SmartEnum_TryFromName_Invalid_IgnoreCase() { if (TestSmartEnum.TryFromName("Invalid", true, out var result)) { return(result); } return(null); }
public TestSmartEnum SmartEnum_TryFromName_Ten() { if (TestSmartEnum.TryFromName("Ten", false, out var result)) { return(result); } return(null); }
public TestSmartEnum SmartEnum_TryFromName_Invalid() { if (TestSmartEnum.TryFromName("Invalid", false, out var result)) { return(result); } return(null); }
public TestSmartEnum SmartEnum_TryFromValue_10() { if (TestSmartEnum.TryFromValue(10, out var result)) { return(result); } return(null); }
public TestSmartEnum SmartEnum_FromName_Invalid_IgnoreCase() { try { return(TestSmartEnum.FromName("Invalid", true)); } catch (SmartEnumNotFoundException) { return(null); } }
public TestSmartEnum SmartEnum_FromName_Invalid() { try { return(TestSmartEnum.FromName("Invalid", false)); } catch (SmartEnumNotFoundException) { return(null); } }
public TestSmartEnum SmartEnum_When() { TestSmartEnum result = null; TestSmartEnum.Ten .When(TestSmartEnum.One).Then(() => result = TestSmartEnum.One) .When(TestSmartEnum.Two).Then(() => result = TestSmartEnum.Two) .When(TestSmartEnum.Three).Then(() => result = TestSmartEnum.Three) .When(TestSmartEnum.Four).Then(() => result = TestSmartEnum.Four) .When(TestSmartEnum.Five).Then(() => result = TestSmartEnum.Five) .When(TestSmartEnum.Six).Then(() => result = TestSmartEnum.Six) .When(TestSmartEnum.Seven).Then(() => result = TestSmartEnum.Seven) .When(TestSmartEnum.Eight).Then(() => result = TestSmartEnum.Eight) .When(TestSmartEnum.Nine).Then(() => result = TestSmartEnum.Nine) .When(TestSmartEnum.Ten).Then(() => result = TestSmartEnum.Ten) .Default(() => throw new Exception()); return(result); }
public TestSmartEnum SmartEnum_FromName_ten_IgnoreCase() => TestSmartEnum.FromName("ten", true);
public TestSmartEnum SmartEnum_FromName_one_IgnoreCase() => TestSmartEnum.FromName("one", true);
public TestSmartEnum SmartEnum_FromName_Ten() => TestSmartEnum.FromName("Ten", false);
public TestSmartEnum SmartEnum_FromName_One() => TestSmartEnum.FromName("One", false);
public TestSmartEnum SmartEnum_FromValue_10() => TestSmartEnum.FromValue(10);