Esempio n. 1
0
        private void VerifyPhoneWithPathMatchesExpected(IEnumerable <IPhoneDeviceInfo> phones, string path, IPhoneDeviceInfo matchingExpected)
        {
            PhoneSelector_Accessor selector       = GetSelector(phones);
            IPhoneDeviceInfo       matchingActual = selector.FindDeviceInfoWithPath(path);

            Assert.AreEqual(matchingExpected, matchingActual);
        }
Esempio n. 2
0
        private void VerifyNewestPhoneMatchesExpected(IEnumerable <IPhoneDeviceInfo> phones, IPhoneDeviceInfo newestExpected)
        {
            PhoneSelector_Accessor selector     = GetSelector(phones);
            IPhoneDeviceInfo       newestActual = selector.GetMostRecentlySyncedDeviceInfo();

            Assert.AreEqual(newestExpected, newestActual);
        }
Esempio n. 3
0
        private void VerifyShouldWarnMatchesExpected(IEnumerable <IPhoneDeviceInfo> phones, bool alwaysPrompt, string autoSelectPath, bool warnForNewer, bool shouldWarnExpected)
        {
            PhoneSelector_Accessor phoneSelector = GetSelector(phones, alwaysPrompt, autoSelectPath, warnForNewer);

            bool shouldWarnActual = phoneSelector.ShouldWarnAboutLaterSyncedPhone();

            Assert.AreEqual(shouldWarnExpected, shouldWarnActual);
        }
Esempio n. 4
0
        private void VerifyAutoSelectMatchesExpected(IEnumerable <IPhoneDeviceInfo> phones, bool alwaysPrompt, string autoSelectPath, IPhoneDeviceInfo autoSelectedExpected)
        {
            PhoneSelector_Accessor phoneSelector = GetSelector(phones, alwaysPrompt, autoSelectPath);

            IPhoneDeviceInfo autoSelectedActual = phoneSelector.AutoSelectPhoneDevice();

            Assert.AreEqual(autoSelectedExpected, autoSelectedActual);
        }
Esempio n. 5
0
        private void VerifyPhoneWithPathIsNotFound(IEnumerable <IPhoneDeviceInfo> phones, string path)
        {
            bool found;

            try
            {
                PhoneSelector_Accessor selector = GetSelector(phones);
                selector.FindDeviceInfoWithPath(path);
                found = true;
            }
            catch (KeyNotFoundException)
            {
                found = false;
            }
            catch (Exception)
            {
                throw;
            }

            Assert.IsFalse(found);
        }