protected override void InternalExecute(ICommandAdapter adapter)
 {
     if (this.ParameterValue <bool>("InBin"))
     {
         var testAlias = _testParameters.GetAlias("WinAppBin", "WebAppBin");
         var path      = Path.Combine(testAlias.Value, Parameters.MainParameter.Value);
         if (File.Exists(path))
         {
             File.Delete(path);
         }
     }
 }
Example #2
0
        protected override void InternalExecute(ICommandAdapter adapter)
        {
            EasyTestTracer.Tracer.InProcedure(GetType().Name + ".Execute");
            EasyTestTracer.Tracer.LogText(Environment.NewLine + Text);
            var testAlias = _testParameters.GetAlias("WinAppBin", "WebAppBin");

            if (string.IsNullOrEmpty(Parameters.MainParameter.Value))
            {
                var modelFile = Directory.GetFiles(_testParameters.ScriptsPath, "*.xafml", SearchOption.TopDirectoryOnly).Single();
                CopyModel(adapter, testAlias, GetUserXafml(modelFile), modelFile);
            }
            else
            {
                var modelFiles = Parameters.MainParameter.Value.Split(';');
                for (int i = 0; i < modelFiles.Length; i++)
                {
                    var path      = Path.Combine(_testParameters.ScriptsPath, modelFiles[i] + ".xafml");
                    var userXafml = GetUserXafml(path, i);
                    CopyModel(adapter, testAlias, userXafml, path);
                }
            }

            EasyTestTracer.Tracer.OutProcedure(GetType().Name + ".Execute");
        }