public void WhenCategoryExists_ThenReturnCategory(int statusCode, int expected) { var result = HttpStatusCodeCategory.CreateFromHttpStatusCode(statusCode); Assert.That(result.Code, Is.EqualTo(expected)); }
public void WhenHttpStatusCodeNotValid_ThenThrowException(int statusCode) { Assert.Throws <ArgumentOutOfRangeException>(() => HttpStatusCodeCategory.CreateFromHttpStatusCode(statusCode)); }