public void ThrowsExceptionWhenEnumIsAboveAllowableRangeFromValueToString() { Assert.Throws <SmartEnumNotFoundException>(() => SmartFlagTestEnum.FromValueToString(32)); }
public void ReturnsStringWithSingleValidValue() { var result = SmartFlagTestEnum.FromValueToString(16); Assert.Equal("Five", result); }
public void ReturnsStringWithFourValidValues() { var result = SmartFlagTestEnum.FromValueToString(15); Assert.Equal("One, Two, Three, Four", result); }
public void ReturnValidStringValues(int inputValue, string outputValue) { var result = SmartFlagTestEnum.FromValueToString(inputValue); Assert.Equal(outputValue, result); }
public void FromValueHighNumberToStringThrowsSmartEnumNotFoundException() { Assert.Throws <SmartEnumNotFoundException>(() => SmartFlagTestEnum.FromValueToString(124)); }
public void OrBitwiseOperatorReturnsStringWithThreeSameValues() { var result = SmartFlagTestEnum.FromValueToString((SmartFlagTestEnum.One | SmartFlagTestEnum.Two | SmartFlagTestEnum.Three)); Assert.Equal("One, Two, Three", result); }