public void CategoryDoesNotExist_ReturnsNotFound() { NumericCategory category = Presto.Create <NumericCategory>(); var result = service.UpdateCategory(category.ID, category.ToJson()); Assert.AreEqual(HttpStatusCode.NotFound, result.StatusCode); }
public void VariableIsNull_ReturnsNotFound() { NumericCategory category = Presto.Create <NumericCategory>(); var result = service.Create(category.ToJson()); Assert.AreEqual(HttpStatusCode.NotFound, result.StatusCode); }
public void CategoryIsValid_ReturnsJson() { NumericCategory category = Presto.Persist <NumericCategory>(); var json = category.ToJson(); var result = service.UpdateCategory(category.ID, json); Assert.NotNull(result.Json); }
public void CategoryIsValid_ReturnsOK() { NumericCategory category = Presto.Persist <NumericCategory>(); var json = category.ToJson(); var result = service.UpdateCategory(category.ID, json); Assert.AreEqual(HttpStatusCode.OK, result.StatusCode); }
public void CategoryIsValid_SavesChanges() { NumericCategory category = Presto.Persist <NumericCategory>(); var json = category.ToJson(); var result = service.UpdateCategory(category.ID, json); Assert.IsTrue(fakeDB.SaveChangesCalled); }