コード例 #1
0
        public void PostMark_ShouldPostTheMarkAndUpdate()
        {
            BiddingBroker broker = new BiddingBroker(InitMockedDb());

            Person goodPerson = GetGoodPerson(broker);
            Person good2      = GetGoodPerson2(broker);

            broker.PostMark(goodPerson, good2, 5);
        }
コード例 #2
0
        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));
        }
コード例 #3
0
        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));
        }
コード例 #4
0
        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));
        }