Browse Source

Fixed unit tests.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@3292 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Matt Ward 18 years ago
parent
commit
87696d60c2
  1. 10
      src/AddIns/BackendBindings/Python/PythonBinding.sln
  2. 6
      src/AddIns/BackendBindings/Python/PythonBinding/Test/Utils/MockProject.cs
  3. 13
      src/AddIns/BackendBindings/WixBinding/Test/Utils/WixBindingTestsHelper.cs
  4. 2
      src/Main/Base/Project/Src/Gui/Pads/ProjectBrowser/TreeNodes/ProjectNode.cs
  5. 5
      src/Main/Base/Project/Src/Project/AbstractProject.cs
  6. 5
      src/Main/Base/Test/WebReferences/WebReferenceTestHelper.cs

10
src/AddIns/BackendBindings/Python/PythonBinding.sln

@ -1,7 +1,7 @@
 
Microsoft Visual Studio Solution File, Format Version 10.00 Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008 # Visual Studio 2008
# SharpDevelop 3.0.0.2745 # SharpDevelop 3.0.0.3280
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PythonBinding", "PythonBinding\Project\PythonBinding.csproj", "{8D732610-8FC6-43BA-94C9-7126FD7FE361}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PythonBinding", "PythonBinding\Project\PythonBinding.csproj", "{8D732610-8FC6-43BA-94C9-7126FD7FE361}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PythonBinding.Tests", "PythonBinding\Test\PythonBinding.Tests.csproj", "{23B517C9-1ECC-4419-A13F-0B7136D085CB}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PythonBinding.Tests", "PythonBinding\Test\PythonBinding.Tests.csproj", "{23B517C9-1ECC-4419-A13F-0B7136D085CB}"
@ -88,14 +88,6 @@ Global
{7D7E92DF-ACEB-4B69-92C8-8AC7A703CD57}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {7D7E92DF-ACEB-4B69-92C8-8AC7A703CD57}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7D7E92DF-ACEB-4B69-92C8-8AC7A703CD57}.Release|Any CPU.Build.0 = Release|Any CPU {7D7E92DF-ACEB-4B69-92C8-8AC7A703CD57}.Release|Any CPU.Build.0 = Release|Any CPU
{7D7E92DF-ACEB-4B69-92C8-8AC7A703CD57}.Release|Any CPU.ActiveCfg = Release|Any CPU {7D7E92DF-ACEB-4B69-92C8-8AC7A703CD57}.Release|Any CPU.ActiveCfg = Release|Any CPU
9BC06DDC-39CF-4F97-8B28-30F74AA672D0.Debug|Any CPU.Build.0 = Debug|Any CPU
9BC06DDC-39CF-4F97-8B28-30F74AA672D0.Debug|Any CPU.ActiveCfg = Debug|Any CPU
9BC06DDC-39CF-4F97-8B28-30F74AA672D0.Release|Any CPU.Build.0 = Release|Any CPU
9BC06DDC-39CF-4F97-8B28-30F74AA672D0.Release|Any CPU.ActiveCfg = Release|Any CPU
{1F1AC7CD-D154-45BB-8EAF-804CA8055F5A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1F1AC7CD-D154-45BB-8EAF-804CA8055F5A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1F1AC7CD-D154-45BB-8EAF-804CA8055F5A}.Release|Any CPU.Build.0 = Release|Any CPU
{1F1AC7CD-D154-45BB-8EAF-804CA8055F5A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C3CBC8E3-81D8-4C5B-9941-DCCD12D50B1F}.Debug|Any CPU.Build.0 = Debug|Any CPU {C3CBC8E3-81D8-4C5B-9941-DCCD12D50B1F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C3CBC8E3-81D8-4C5B-9941-DCCD12D50B1F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {C3CBC8E3-81D8-4C5B-9941-DCCD12D50B1F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C3CBC8E3-81D8-4C5B-9941-DCCD12D50B1F}.Release|Any CPU.Build.0 = Release|Any CPU {C3CBC8E3-81D8-4C5B-9941-DCCD12D50B1F}.Release|Any CPU.Build.0 = Release|Any CPU

6
src/AddIns/BackendBindings/Python/PythonBinding/Test/Utils/MockProject.cs

@ -42,11 +42,7 @@ namespace PythonBinding.Tests.Utils
} }
public bool ReadOnly { public bool ReadOnly {
get get { return false; }
{
FileAttributes attributes = File.GetAttributes(FileName);
return ((FileAttributes.ReadOnly & attributes) == FileAttributes.ReadOnly);
}
} }
public ICollection<ItemType> AvailableFileItemTypes { public ICollection<ItemType> AvailableFileItemTypes {

13
src/AddIns/BackendBindings/WixBinding/Test/Utils/WixBindingTestsHelper.cs

@ -19,6 +19,17 @@ namespace WixBinding.Tests.Utils
/// </summary> /// </summary>
public class WixBindingTestsHelper public class WixBindingTestsHelper
{ {
class DummyWixProject : WixProject
{
public DummyWixProject(ProjectCreateInformation info) : base (info)
{
}
public override bool ReadOnly {
get { return false; }
}
}
WixBindingTestsHelper() WixBindingTestsHelper()
{ {
} }
@ -37,7 +48,7 @@ namespace WixBinding.Tests.Utils
info.ProjectName = "Test"; info.ProjectName = "Test";
info.OutputProjectFileName = @"C:\Projects\Test\Test.wixproj"; info.OutputProjectFileName = @"C:\Projects\Test\Test.wixproj";
return new WixProject(info); return new DummyWixProject(info);
} }
/// <summary> /// <summary>

2
src/Main/Base/Project/Src/Gui/Pads/ProjectBrowser/TreeNodes/ProjectNode.cs

@ -49,8 +49,6 @@ namespace ICSharpCode.SharpDevelop.Project
{ {
sortOrder = 1; sortOrder = 1;
this.ContextmenuAddinTreePath = "/SharpDevelop/Pads/ProjectBrowser/ContextMenu/ProjectNode"; this.ContextmenuAddinTreePath = "/SharpDevelop/Pads/ProjectBrowser/ContextMenu/ProjectNode";
this.project = project; this.project = project;

5
src/Main/Base/Project/Src/Project/AbstractProject.cs

@ -127,9 +127,8 @@ namespace ICSharpCode.SharpDevelop.Project
/// True if the file that contains the project is readonly. /// True if the file that contains the project is readonly.
/// </summary> /// </summary>
[ReadOnly(true)] [ReadOnly(true)]
public bool ReadOnly { public virtual bool ReadOnly {
get get {
{
FileAttributes attributes = File.GetAttributes(FileName); FileAttributes attributes = File.GetAttributes(FileName);
return ((FileAttributes.ReadOnly & attributes) == FileAttributes.ReadOnly); return ((FileAttributes.ReadOnly & attributes) == FileAttributes.ReadOnly);
} }

5
src/Main/Base/Test/WebReferences/WebReferenceTestHelper.cs

@ -25,6 +25,7 @@ namespace ICSharpCode.SharpDevelop.Tests.WebReferences
class TestProject : CompilableProject class TestProject : CompilableProject
{ {
string languageName; string languageName;
bool readOnly = false;
public TestProject(string languageName) public TestProject(string languageName)
: base(new Solution()) : base(new Solution())
@ -36,6 +37,10 @@ namespace ICSharpCode.SharpDevelop.Tests.WebReferences
get { return languageName; } get { return languageName; }
} }
public override bool ReadOnly {
get { return readOnly; }
}
public override ICSharpCode.SharpDevelop.Dom.LanguageProperties LanguageProperties { public override ICSharpCode.SharpDevelop.Dom.LanguageProperties LanguageProperties {
get { return ICSharpCode.SharpDevelop.Dom.LanguageProperties.CSharp; } get { return ICSharpCode.SharpDevelop.Dom.LanguageProperties.CSharp; }
} }

Loading…
Cancel
Save