Esempio n. 1
0
 public void TrackPageEvent_InActiveTracker_ShouldNotTrack(Database db, [Content] Item item, ITracker tracker, TrackerService trackerService)
 {
   using (new TrackerSwitcher(tracker))
   {
     trackerService.TrackPageEvent(item.ID);
     tracker.CurrentPage.DidNotReceive().Register(Arg.Is<PageEventItem>(x => x.ID == item.ID));
   }
 }
Esempio n. 2
0
 public void TrackPageEvent_ValidID_ShouldTrackById(Database db, [Content] Item item, ITracker tracker, TrackerService trackerService)
 {
   tracker.IsActive.Returns(true);
   using (new TrackerSwitcher(tracker))
   {
     trackerService.TrackPageEvent(item.ID);
     tracker.CurrentPage.Received(1).Register(Arg.Is<PageEventItem>(x => x.ID == item.ID));
   }
 }
Esempio n. 3
0
 public void TrackPageEvent_NullTracker_ShouldNotTrackEvent(Database db, [Content] Item item, ITracker tracker, TrackerService trackerService)
 {
   trackerService.TrackPageEvent(item.ID);
   tracker.CurrentPage.DidNotReceive().Register(Arg.Is<PageEventItem>(x => x.ID == item.ID));
 }