Exemplo n.º 1
0
            public void WillThrowWhenCuratedPackageDoesNotExist()
            {
                var svc = new TestableCuratedFeedService();

                Assert.Throws <InvalidOperationException>(
                    () => svc.DeleteCuratedPackage(
                        0,
                        1066));
            }
Exemplo n.º 2
0
            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 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));
            }