private void VerifyPhoneWithPathMatchesExpected(IEnumerable <IPhoneDeviceInfo> phones, string path, IPhoneDeviceInfo matchingExpected) { PhoneSelector_Accessor selector = GetSelector(phones); IPhoneDeviceInfo matchingActual = selector.FindDeviceInfoWithPath(path); Assert.AreEqual(matchingExpected, matchingActual); }
private void VerifyNewestPhoneMatchesExpected(IEnumerable <IPhoneDeviceInfo> phones, IPhoneDeviceInfo newestExpected) { PhoneSelector_Accessor selector = GetSelector(phones); IPhoneDeviceInfo newestActual = selector.GetMostRecentlySyncedDeviceInfo(); Assert.AreEqual(newestExpected, newestActual); }
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); }
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); }
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); }