public voidSave(T entity) { // Save my stuff }
You can do this in your unit test:
FloppyDisk floppyDiskBeingSaved = null; oldSkoolRepo.Setup(r => r.Save(It.IsAny())).Callback (en => {floppyDiskBeingSaved = en;}).Returns(() => Task.FromResult(floppyDiskBeingSaved)); Assert.AreEqual(stuff, floppyDiskBeingSaved);