public void DoCheckOfferor_ShouldThrow() { PersonOfferor offeror = null; var auctionServcie = InstanceHelper.GetAuctionService(null); Assert.ThrowsAny <Exception>(() => CanOfferorEndAuctionCheck.DoCheck(offeror, auctionServcie)); }
public void DoCheck_ShouldBeValid() { var offeror = InstanceHelper.GetPersonOfferor(); var auctionServcie = InstanceHelper.GetAuctionService(null); // If throws error, this test will fail CanOfferorEndAuctionCheck.DoCheck(offeror, auctionServcie); Assert.True(true); }
/// <summary> /// Ends the auction. /// </summary> /// <param name="offeror">The offer person.</param> public void EndAuction(PersonOfferor offeror) { try { this.Auction.ValidateObject(); CanOfferorEndAuctionCheck.DoCheck(offeror, this); } catch (Exception e) { throw e; } this.IsActive = false; this.Auction.EndDate = DateTime.Now; this.HadEnded = true; }