public void ItShouldThrowWhenParseNoFlagsFromFlagString() { var invalidString = "red, black"; var exception = Record.Exception(() => NoFlagsEnum.Parse(invalidString)); Assert.NotNull(exception); Assert.IsType <ArgumentException>(exception); }
public void ItShouldThrowWhenNoFlagsFromFlagValue() { var invalidValue = 3; var exception = Record.Exception(() => NoFlagsEnum.FromValue(invalidValue)); Assert.NotNull(exception); Assert.IsType <ArgumentOutOfRangeException>(exception); }