Exemple #1
0
            public void WhenCategoryExists_ThenReturnCategory(int statusCode, int expected)
            {
                var result = HttpStatusCodeCategory.CreateFromHttpStatusCode(statusCode);

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