コード例 #1
0
        public void CardMapper_MapCardFromTracks_ShouldNotReturnNull()
        {
            // Arrange
            this.GcrResponse.GCR_CARDTYPE.Value = ApplicationType.ContactlessEmv;

            // Act
            CardEntry mappedCard = CardMapper.MapCardFromTracks(
                this.GcrResponse,
                CardBrandMocker.Mock());

            // Assert
            Assert.IsNotNull(mappedCard);
        }
コード例 #2
0
        public void CardMapper_MapCardFromTracks_ShouldThrowException_IfApplicationTypeIsEasyEntryOverTIBCv1()
        {
            // Assert
            Assert.Throws <NotImplementedException>(() =>
            {
                // Arrange
                this.GcrResponse.GCR_CARDTYPE.Value = ApplicationType.EasyEntryOverTIBCv1;

                // Act
                CardEntry mappedCard = CardMapper.MapCardFromTracks(
                    this.GcrResponse,
                    CardBrandMocker.Mock());
            });
        }
コード例 #3
0
        public void PinpadTransaction_ReadCard_test()
        {
            IPinpadConnection conn     = PinpadConnectionProvider.GetFirst();
            PinpadFacade      facade   = new PinpadFacade(conn);
            TransactionType   trnxType = TransactionType.Undefined;

            facade.TransactionService.EmvTable.UpdatePinpad(false);

            CardEntry card = facade.TransactionService.ReadCard(
                TransactionType.Debit,
                0.1m,
                out trnxType,
                CardBrandMocker.Mock());

            facade.TransactionService.ReadPassword(
                0.1m,
                card.PrimaryAccountNumber,
                CardType.Emv);

            Assert.IsNotNull(card);
        }