当前位置: 首页>>代码示例>>C#>>正文


C# ITracker.GetContactOutcomes方法代码示例

本文整理汇总了C#中ITracker.GetContactOutcomes方法的典型用法代码示例。如果您正苦于以下问题:C# ITracker.GetContactOutcomes方法的具体用法?C# ITracker.GetContactOutcomes怎么用?C# ITracker.GetContactOutcomes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ITracker的用法示例。


在下文中一共展示了ITracker.GetContactOutcomes方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: TrackOutcome_InactiveTracker_ShouldNotTrack

    public void TrackOutcome_InactiveTracker_ShouldNotTrack([Frozen]ID outcomeDefinitionId, [Frozen]IAccountsSettingsService accountsSettingsService, [NoAutoProperties] AccountTrackerService trackerService, ITracker tracker)
    {
      // Arrange
      tracker.IsActive.Returns(false);
      tracker.Session.Returns(Substitute.For<Session>());
      tracker.Session.CustomData.Returns(new Dictionary<string, object>());

      using (new TrackerSwitcher(tracker))
      {
        // Act
        trackerService.TrackOutcome(outcomeDefinitionId);

        // Assert
        tracker.GetContactOutcomes().Should().BeEmpty();
      }
    }
开发者ID:robearlam,项目名称:Habitat,代码行数:16,代码来源:AccountTrackerServiceTests.cs

示例2: TrackRegister_Call_ShouldTrackRegistrationGoal

    public void TrackRegister_Call_ShouldTrackRegistrationGoal(Db db, ID outcomeID, ITracker tracker, [Frozen]IAccountsSettingsService accountsSettingsService, AccountTrackerService accountTrackerService)
    {
      // Arrange
      tracker.IsActive.Returns(true);
      tracker.Contact.Returns(Substitute.For<Contact>());
      tracker.Interaction.Returns(Substitute.For<CurrentInteraction>());
      tracker.Session.Returns(Substitute.For<Session>());
      tracker.Session.CustomData.Returns(new Dictionary<string, object>());

      accountsSettingsService.GetRegistrationOutcome(Arg.Any<Item>()).Returns(outcomeID);

      db.Add(new DbItem("Item", ConfigSettings.RegistrationGoalId));
      db.Add(new DbItem("Item", ConfigSettings.LoginGoalId));

      using (new TrackerSwitcher(tracker))
      {
        accountTrackerService.TrackRegistration();
        tracker.CurrentPage.Received(1).Register(Arg.Is<PageEventItem>(x => x.ID == ConfigSettings.RegistrationGoalId));
        tracker.GetContactOutcomes().Should().Contain(o => o.DefinitionId == outcomeID);
      }
    }
开发者ID:robearlam,项目名称:Habitat,代码行数:21,代码来源:AccountTrackerServiceTests.cs

示例3: TrackOutcome_ValidOutcome_ShouldRegisterOutcome

    public void TrackOutcome_ValidOutcome_ShouldRegisterOutcome([Frozen]ID outcomeDefinitionId, [Frozen]IAccountsSettingsService accountsSettingsService, [NoAutoProperties] AccountTrackerService trackerService, ITracker tracker, Contact contact, CurrentInteraction interaction)
    {
      tracker.IsActive.Returns(true);
      tracker.Contact.Returns(contact);
      tracker.Interaction.Returns(interaction);
      tracker.Session.Returns(Substitute.For<Session>());
      tracker.Session.CustomData.Returns(new Dictionary<string, object>());

      using (new TrackerSwitcher(tracker))
      {
        trackerService.TrackOutcome(outcomeDefinitionId);

        tracker.GetContactOutcomes().Should().Contain(o => o.DefinitionId == outcomeDefinitionId);
      }
    }
开发者ID:robearlam,项目名称:Habitat,代码行数:15,代码来源:AccountTrackerServiceTests.cs


注:本文中的ITracker.GetContactOutcomes方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。