public void FindCustomerContactByLinkAccountTokenShouldBeNull() { var service = new VippsLoginCommerceService( A.Fake <IVippsLoginService>(), A.Fake <IVippsLoginMapper>(), A.Fake <IVippsLoginDataLoader>(), A.Fake <ICustomerContactService>()); var contact = service.FindCustomerContactByLinkAccountToken(Guid.Empty); Assert.Null(contact); }
public void FindCustomerContactByLinkAccountTokenShouldReturnNotEqualLastContact() { var expectedContact = new CustomerContact(); var dataLoader = A.Fake <IVippsLoginDataLoader>(); A.CallTo(() => dataLoader.FindContactsByLinkAccountToken(A <Guid> ._)) .Returns(new[] { new CustomerContact(), expectedContact }); var service = new VippsLoginCommerceService( A.Fake <IVippsLoginService>(), A.Fake <IVippsLoginMapper>(), dataLoader, A.Fake <ICustomerContactService>() ); var contact = service.FindCustomerContactByLinkAccountToken(Guid.Empty); Assert.NotEqual(expectedContact, contact); }