Ejemplo n.º 1
0
        public void Pay_IfValidCost_ShouldDecreaseTheResources()
        {
            var unit = new MockedUnit(1234, "Ivan");
            var initialResources = unit.Resources;

            var cost = new Resources();
            unit.Pay(cost);
            var resultResources = unit.Resources;

            Assert.IsTrue(initialResources==resultResources);
        }
Ejemplo n.º 2
0
        public void Pay_IfObjectPassedIsNull_ShouldThrowException()
        {
            var unit = new MockedUnit(1234, "Ivan");

            Assert.Throws<NullReferenceException>(()=>unit.Pay(null));
        }