public void TownsPostWithInvalidShouldReturnBadRequestResult() { MyWebApi .Controller <TownsController>() .WithResolvedDependencyFor(this.townService) .Calling(c => c.Post(TestObjectFactory.GetInvalidTownModel())) .ShouldHave() .InvalidModelState(); }