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));
       }
 }
        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));
              }
        }
 public void TrackPageEventShouldAssertTracker(ID id, AccountTrackerService accountTrackerService)
 {
     accountTrackerService.Invoking(x => x.TrackPageEvent(id)).ShouldThrow<InvalidOperationException>();
 }
 public void TrackPageEventShouldAssertArguments(AccountTrackerService accountTrackerService)
 {
     accountTrackerService.Invoking(x => x.TrackPageEvent(null)).ShouldThrow<ArgumentNullException>();
 }