Beispiel #1
0
            public void WhenCategoryExists_ThenReturnCategory(int code, string name)
            {
                var result = HttpStatusCodeCategory.CreateFromCategoryCode(code);

                Assert.That(result.Code, Is.EqualTo(code));
                Assert.That(result.Name, Is.EqualTo(name));
                Assert.That(result.Description.Length, Is.GreaterThan(0));
            }
Beispiel #2
0
 public void WhenCategoryDoesNotExist_ThenThrowException(int categoryCode)
 {
     Assert.Throws <ArgumentException>(() => HttpStatusCodeCategory.CreateFromCategoryCode(categoryCode));
 }