public void PostMark_ShouldPostTheMarkAndUpdate() { BiddingBroker broker = new BiddingBroker(InitMockedDb()); Person goodPerson = GetGoodPerson(broker); Person good2 = GetGoodPerson2(broker); broker.PostMark(goodPerson, good2, 5); }
public void PostMark_ShouldThrowDueMarkInvalid(int mark) { BiddingBroker broker = new BiddingBroker(InitMockedDb()); Person goodPerson = GetGoodPerson(broker); Person good2 = GetGoodPerson2(broker); Assert.ThrowsAny <Exception>(() => broker.PostMark(goodPerson, good2, mark)); }
public void PostMark_ShouldThrowDueIdReceiver() { BiddingBroker broker = new BiddingBroker(InitMockedDb()); Person goodPerson = GetGoodPerson(broker); Person good2 = GetGoodPerson2(broker); good2.IdPerson = 0; Assert.ThrowsAny <Exception>(() => broker.PostMark(goodPerson, good2, 5)); }
public void PostMark_ShouldThrowDueUnregisteredPerson() { BiddingBroker broker = new BiddingBroker(InitMockedDb()); Person good = GetGoodPerson(broker); Person bad = new Person() { Name = "ups", Phone = "un phone" }; Assert.ThrowsAny <Exception>(() => broker.PostMark(good, bad, 5)); }