public void CanMockRemove() { var modelCreator = ninjectKernel.Get<ModelCreator> (); var modelRepository = ninjectKernel.Get<IModelRepository> (); var aModel = new Model () { FieldA = 1, FieldB = "Test"}; modelCreator.RemoveModel (aModel); modelRepository.AssertWasCalled (p => p.Remove (aModel)); }
public void RemoveModel(Model aModel) { repository.Remove(aModel); }
public void CreateModel(Model aModel) { repository.Add(aModel); }
public void Remove(Model aModel) { ModelCount++; }
public void Add(Model aModel) { ModelCount ++; }