Ejemplo n.º 1
0
        public void Purchase_Missing()
        {
            var funds   = new FundStorage(Money.Dollar(3));
            var manager = new ClipperManager(0);

            manager.TryPurchase(funds);
            Assert.Equal(Money.Dollar(3), funds.Funds);
            Assert.Equal(0ul, manager.ClipperCount);
            Assert.Equal(Money.Cents(500), manager.Cost);
        }
Ejemplo n.º 2
0
        public void Purchase_Enough()
        {
            var funds   = new FundStorage(Money.Dollar(7));
            var manager = new ClipperManager(0);

            manager.TryPurchase(funds);
            Assert.Equal(Money.Dollar(2), funds.Funds);
            Assert.Equal(1ul, manager.ClipperCount);
            Assert.Equal(Money.Cents(610), manager.Cost);
        }