Exemplo n.º 1
0
        public void InitializeAppCenterTest()
        {
            MockAppCenterService.Reset();
            AppCenter.Instance = null;

            // Return non-null channels.
            _channelGroupMock.Setup(
                group => group.AddChannel(It.IsAny <string>(), It.IsAny <int>(), It.IsAny <TimeSpan>(), It.IsAny <int>()))
            .Returns(_channelMock.Object);

            // Set factories.
#pragma warning disable 612
            AppCenter.SetApplicationSettingsFactory(new MockApplicationSettingsFactory(_settingsMock));
            AppCenter.SetChannelGroupFactory(new MockChannelGroupFactory(_channelGroupMock));
#pragma warning restore 612
        }
Exemplo n.º 2
0
 public static void Reset()
 {
     _instanceField = new MockAppCenterService();
 }