public void Should_Be_Ok_When_Posting() { var fakes = new FakeContext("LayerControllerTest"); var fakeLayerService = fakes.FakeLayerService().Object; List <LayerViewModel> expected = fakes.Get <LayerViewModel>(); var controller = new LayerController(fakeLayerService); foreach (var item in expected) { var result = controller.Post(item); Assert.NotNull(result); Assert.IsType <CreatedAtActionResult>(result); } }