public void GetBodyContentType_OutOfRangeValue() { // Given BodyType value = (BodyType)int.MaxValue; // When var exception = Record.Exception(() => RestUtilities.GetBodyContentType(value)); // Then exception.Should().BeOfType <ArgumentOutOfRangeException>(); }