public void GetRAMPFileLocation_RAMPInstalled_ReturnsFileLocation()
        {
            IgnoreTestIfRampIsNotInstalled();

            var fileName = RampArchivingDlgViewModel.GetExeFileLocation();

            Assert.IsTrue(File.Exists(fileName), "RAMP executable file not found.");
        }
        private void IgnoreTestIfRampIsNotInstalled()
        {
            if (!_isRampInstalled.HasValue)
            {
                // we remember the value so that we check only once. This won't change within
                // a test run.
                _isRampInstalled = !string.IsNullOrEmpty(RampArchivingDlgViewModel.GetExeFileLocation());
            }

            if (!_isRampInstalled.Value)
            {
                Assert.Ignore("This test requires RAMP");
            }
        }
示例#3
0
        static ReapRamp()
        {
            var exePath = RampArchivingDlgViewModel.GetExeFileLocation();

            Installed = !string.IsNullOrEmpty(exePath) && File.Exists(exePath);
        }