Beispiel #1
0
        public void CancelShouldNotWorkWhenResulIsNotProvided()
        {
            var repair = new Repair(Guid.NewGuid(), "desc", Guid.NewGuid(), Guid.NewGuid());

            repair.PricingAccepted();
            Action action = () => repair.Cancel("");

            Assert.Throws <DomainException>(action);
        }
Beispiel #2
0
        public void CancelShouldWork()
        {
            var repair = new Repair(Guid.NewGuid(), "desc", Guid.NewGuid(), Guid.NewGuid());

            repair.PricingAccepted();
            repair.Cancel("some reason");

            Assert.Equal(RepairStatus.Canceled, repair.GetStatus());
        }