public void WillThrowWhenCuratedPackageDoesNotExist() { var svc = new TestableCuratedFeedService(); Assert.Throws <InvalidOperationException>( () => svc.DeleteCuratedPackage( 0, 1066)); }
public void WillDeleteTheCuratedPackage() { var svc = new TestableCuratedFeedService(); svc.DeleteCuratedPackage( 0, 1066); svc.StubCuratedPackageRepository.Verify(stub => stub.DeleteOnCommit(svc.StubCuratedPackage)); svc.StubCuratedPackageRepository.Verify(stub => stub.CommitChanges()); }
public void WillThrowWhenCuratedPackageDoesNotExist() { var svc = new TestableCuratedFeedService(); Assert.Throws<InvalidOperationException>( () => svc.DeleteCuratedPackage( 0, 1066)); }