public void EntityPostTest() { using (var repo = new RepositoryMock()) { Assert.AreEqual(0, repo.TimesCalled); var target = new EntitiesController(repo); target.Post(new Entity()); Assert.AreEqual(1, repo.TimesCalled); } }