Пример #1
0
 public void TrackPageEvent_InActiveTracker_ShouldNotTrack(Database db, [Content] Item item, ITracker tracker, AccountTrackerService accountTrackerService)
 {
     using (new TrackerSwitcher(tracker))
     {
         accountTrackerService.TrackPageEvent(item.ID);
         tracker.CurrentPage.DidNotReceive().Register(Arg.Is <PageEventItem>(x => x.ID == item.ID));
     }
 }
Пример #2
0
 public void TrackPageEvent_ValidID_ShouldTrackById(Database db, [Content] Item item, ITracker tracker, AccountTrackerService accountTrackerService)
 {
     tracker.IsActive.Returns(true);
     using (new TrackerSwitcher(tracker))
     {
         accountTrackerService.TrackPageEvent(item.ID);
         tracker.CurrentPage.Received(1).Register(Arg.Is <PageEventItem>(x => x.ID == item.ID));
     }
 }
Пример #3
0
 public void TrackPageEvent_NullTracker_ShouldNotTrackEvent(Database db, [Content] Item item, ITracker tracker, AccountTrackerService accountTrackerService)
 {
     accountTrackerService.TrackPageEvent(item.ID);
     tracker.CurrentPage.DidNotReceive().Register(Arg.Is <PageEventItem>(x => x.ID == item.ID));
 }