public RealCoinIdentifier(ICoinIdentifier successor, ICoinCheck coinCheck, CoinInput coinSpec, string value)
 {
     _coinSpec = coinSpec;
     _successor = successor;
     _coinCheck = coinCheck;
     _value = value;
 }
 public void SetUp()
 {
     _successor = MockRepository.GenerateStub<ICoinIdentifier>();
     _coinCheck = MockRepository.GenerateStub<ICoinCheck>();
     _expectedMass = 10;
     _value = "One florin";
     _realCoinIdentifier = new RealCoinIdentifier(_successor, _coinCheck, new CoinInput {Mass = _expectedMass}, _value);
 }
Esempio n. 3
0
        public void SetUp()
        {
            _coinIdentifier = NSubstitute.Substitute.For <ICoinIdentifier>();

            _products = new List <Product>()
            {
                new Product {
                    Name = "cola", Price = 1
                },
                new Product {
                    Name = "chips", Price = 0.5M
                },
                new Product {
                    Name = "candy", Price = 0.65M
                },
            };

            _testObject = new VendingMachine(_coinIdentifier, _products);
        }
Esempio n. 4
0
 public Sorter(ICoinIdentifier coinIdentifier)
 {
     _coinIdentifier = coinIdentifier;
 }
 public void SetUp()
 {
     _coinIdentifier = MockRepository.GenerateStub<ICoinIdentifier>();
     _sorter = new Sorter(_coinIdentifier);
 }
Esempio n. 6
0
 public VendingMachine(ICoinIdentifier coinIdentifier, List <Product> products)
 {
     _coinIdentifier = coinIdentifier;
     _products       = products;
 }