Exemplo n.º 1
0
        public void CardDataIsPassedToIsValidCardData(string data)
        {
            ValidCardDataSpy spy = new ValidCardDataSpy();

            new AddCard(spy, new CardGatewayDummy(), new PackGatewayDummy(), new IncrementVersionNumberDummy()).Execute(data);
            Assert.True(spy.LastCardData == data);
        }
Exemplo n.º 2
0
        public void ThenEachStringIsPassedToValidCardData(int dataCount)
        {
            string[] stringArray = new string[dataCount];
            for (int i = 0; i < dataCount; i++)
            {
                stringArray[i] = Guid.NewGuid().ToString();
            }

            ValidCardDataSpy spy = new ValidCardDataSpy();

            new ValidCardsData(spy).Execute(stringArray);
            foreach (string s in stringArray)
            {
                Assert.True(spy.CardDataHistory.Contains(s));
            }
        }