~halega/+junk/sharpdevelop

« back to all changes in this revision

Viewing changes to src/AddIns/Misc/PackageManagement/Test/Src/Helpers/FakePowerShellSession.cs

  • Committer: sk
  • Date: 2011-09-10 05:17:57 UTC
  • Revision ID: halega@halega.com-20110910051757-qfouz1llya9m6boy
4.1.0.7915 Release Candidate 1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
 
2
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
 
3
 
 
4
using System;
 
5
using System.Collections.Generic;
 
6
using ICSharpCode.PackageManagement.Scripting;
 
7
 
 
8
namespace PackageManagement.Tests.Helpers
 
9
{
 
10
        public class FakePackageScriptSession : IPackageScriptSession
 
11
        {
 
12
                public string EnvironmentPath = String.Empty;
 
13
                
 
14
                public void SetEnvironmentPath(string path)
 
15
                {
 
16
                        EnvironmentPath = path;
 
17
                }
 
18
                
 
19
                public string GetEnvironmentPath()
 
20
                {
 
21
                        return EnvironmentPath;
 
22
                }
 
23
                
 
24
                public Dictionary<string, object> VariablesAdded = new Dictionary<string, object>();
 
25
                
 
26
                public void AddVariable(string name, object value)
 
27
                {
 
28
                        VariablesAdded.Add(name, value);
 
29
                }
 
30
                
 
31
                public List<string> VariablesRemoved = new List<string>();
 
32
                
 
33
                public void RemoveVariable(string name)
 
34
                {
 
35
                        VariablesRemoved.Add(name);
 
36
                }
 
37
                
 
38
                public bool IsScriptExecuted;
 
39
                public string ScriptPassedToInvokeScript;
 
40
                
 
41
                public void InvokeScript(string script)
 
42
                {
 
43
                        IsScriptExecuted = true;
 
44
                        ScriptPassedToInvokeScript = script;
 
45
                }
 
46
        }
 
47
}