コード例 #1
0
 public void TrackPageEventShouldTrackById(Database db, [Content] Item item, ITracker tracker, AccountTrackerService accountTrackerService)
 {
     using (new TrackerSwitcher(tracker))
       {
     accountTrackerService.TrackPageEvent(item.ID);
     tracker.CurrentPage.Received(1).Register(Arg.Is<PageEventItem>(x => x.ID == item.ID));
       }
 }
コード例 #2
0
        public void TrackRegisterShouldTrack(Db db, ITracker tracker, AccountTrackerService accountTrackerService)
        {
            db.Add(new DbItem("Item", ConfigSettings.RegisterGoalId));

              using (db)
              using (new TrackerSwitcher(tracker))
              {
            accountTrackerService.TrackRegister();
            tracker.CurrentPage.Received(1).Register(Arg.Is<PageEventItem>(x => x.ID == ConfigSettings.RegisterGoalId));
              }
        }
コード例 #3
0
 public void TrackPageEventShouldAssertTracker(ID id, AccountTrackerService accountTrackerService)
 {
     accountTrackerService.Invoking(x => x.TrackPageEvent(id)).ShouldThrow<InvalidOperationException>();
 }
コード例 #4
0
 public void TrackPageEventShouldAssertArguments(AccountTrackerService accountTrackerService)
 {
     accountTrackerService.Invoking(x => x.TrackPageEvent(null)).ShouldThrow<ArgumentNullException>();
 }