Пример #1
0
        public void ApplyTokens_PathGetFullPathThrowsExpection_DoNotThrowExcpetion_PathRemains()
        {
            _path.GetFullPath(Arg.Any <string>()).Throws(new Exception());
            var job = new Job(new JobInfo(), _profile, _unusedAccounts);

            job.Profile.Scripting.ScriptFile = "inputPATH";

            Assert.DoesNotThrow(() =>
            {
                _scriptAction.ApplyPreSpecifiedTokens(job);
            });

            Assert.AreEqual("inputPATH", job.Profile.Scripting.ScriptFile, "Path did not remain");
        }