Exemplo n.º 1
0
        public void TrackLogin_Call_ShouldTrackLoginGoal(string source, string identifier, [Frozen] ITrackerService trackerService, [Greedy] AccountTrackerService accountTrackerService)
        {
            //Act
            accountTrackerService.TrackLoginAndIdentifyContact(source, identifier);

            //Assert
            trackerService.Received(1).TrackGoal(AccountTrackerService.LoginGoalId, source);
            trackerService.Received(1).IdentifyContact(source, identifier);
        }
Exemplo n.º 2
0
        public void TrackLogin_Call_ShouldTrackLoginGoal(string identifier, Db db, [Frozen] ITrackerService trackerService, [Greedy] AccountTrackerService accountTrackerService)
        {
            //Arrange
            db.Add(new DbItem("Item", AccountTrackerService.LoginGoalId));

            //Act
            accountTrackerService.TrackLoginAndIdentifyContact(identifier);

            //Assert
            trackerService.Received().TrackPageEvent(Arg.Is <ID>(AccountTrackerService.LoginGoalId));
        }