예제 #1
0
        public void FindCustomerContactShouldBeNull()
        {
            var service = new VippsLoginCommerceService(
                A.Fake <IVippsLoginService>(),
                A.Fake <IVippsLoginMapper>(),
                A.Fake <IVippsLoginDataLoader>(), A.Fake <ICustomerContactService>());

            var contact = service.FindCustomerContact(Guid.Empty);

            Assert.Null(contact);
        }
예제 #2
0
        public void FindCustomerContactShouldReturnNotEqualLastContact()
        {
            var expectedContact = new CustomerContact();
            var dataLoader      = A.Fake <IVippsLoginDataLoader>();

            A.CallTo(() => dataLoader.FindContactsBySubjectGuid(A <Guid> ._))
            .Returns(new[] { new CustomerContact(), expectedContact });
            var service = new VippsLoginCommerceService(
                A.Fake <IVippsLoginService>(),
                A.Fake <IVippsLoginMapper>(),
                dataLoader,
                A.Fake <ICustomerContactService>()
                );

            var contact = service.FindCustomerContact(Guid.Empty);

            Assert.NotEqual(expectedContact, contact);
        }