Esempio n. 1
0
        public void ShouldAbortPull_MobileDataEnabled_Should_ReturnFalse()
        {
            // Given
            PullRules pullRules = new PullRules();

            ConnectivityHelper.MockConnectionProfiles(new List <ConnectionProfile> {
                ConnectionProfile.Cellular
            });
            LocalPreferencesHelper.SetIsDownloadWithMobileDataEnabled(true);

            // When
            bool shouldAbortPull = pullRules.ShouldAbortPull();

            // Then
            Assert.False(shouldAbortPull);

            ConnectivityHelper.ResetConnectionProfiles();
        }
Esempio n. 2
0
        public void ShouldAbortPull_MobileDataEnabled_NotSavedLog()
        {
            // Given
            PullRules pullRules = new PullRules();

            ConnectivityHelper.MockConnectionProfiles(new List <ConnectionProfile> {
                ConnectionProfile.Cellular
            });
            LocalPreferencesHelper.SetIsDownloadWithMobileDataEnabled(true);

            // When
            string pullKeyInfoPre = _developerToolsService.LastPullHistory;

            pullRules.ShouldAbortPull();
            string pullKeyInfoPost = _developerToolsService.LastPullHistory;

            // Then
            Assert.Empty(pullKeyInfoPre);
            Assert.Empty(pullKeyInfoPost);

            ConnectivityHelper.ResetConnectionProfiles();
        }