Browse Source

Fixed broken build.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@2565 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Daniel Grunwald 19 years ago
parent
commit
ac2e558736
  1. 10
      src/AddIns/BackendBindings/WixBinding/Test/Project/CreateNewWixProjectObjectTestFixture.cs
  2. 2
      src/AddIns/BackendBindings/XamlBinding/Project/Src/XamlCompilationUnit.cs
  3. 9
      src/AddIns/Misc/UnitTesting/Test/Project/IsTestMethodTests.cs
  4. 26
      src/AddIns/Misc/UnitTesting/Test/Utils/MockAttribute.cs
  5. 5
      src/AddIns/Misc/UnitTesting/Test/Utils/MockProjectContent.cs

10
src/AddIns/BackendBindings/WixBinding/Test/Project/CreateNewWixProjectObjectTestFixture.cs

@ -67,11 +67,15 @@ namespace WixBinding.Tests.Project @@ -67,11 +67,15 @@ namespace WixBinding.Tests.Project
[Test]
public void Imports()
{
Assert.AreEqual(2, project.MSBuildProject.Imports.Count);
Microsoft.Build.BuildEngine.Import[] imports = {null, null};
// this is machine-dependent, it's possible that additional imports are loaded
//Assert.AreEqual(2, project.MSBuildProject.Imports.Count);
Microsoft.Build.BuildEngine.Import[] imports = new Microsoft.Build.BuildEngine.Import[project.MSBuildProject.Imports.Count];
project.MSBuildProject.Imports.CopyTo(imports, 0);
string[] paths = new string[] {imports[0].ProjectPath, imports[1].ProjectPath};
string[] paths = new string[imports.Length];
for (int i = 0; i < imports.Length; i++) {
paths[i] = imports[i].ProjectPath;
}
Assert.Contains(WixProject.DefaultTargetsFile, paths);
Assert.Contains(@"$(MSBuildBinPath)\Microsoft.Common.targets", paths);

2
src/AddIns/BackendBindings/XamlBinding/Project/Src/XamlCompilationUnit.cs

@ -49,7 +49,7 @@ namespace XamlBinding @@ -49,7 +49,7 @@ namespace XamlBinding
if (type != null)
return type;
foreach (IProjectContent p in this.ProjectContent.ReferencedContents) {
type = FindTypeInAssembly(this.ProjectContent, xmlNamespace, className);
type = FindTypeInAssembly(p, xmlNamespace, className);
if (type != null)
return type;
}

9
src/AddIns/Misc/UnitTesting/Test/Project/IsTestMethodTests.cs

@ -55,15 +55,6 @@ namespace UnitTesting.Tests.Project @@ -55,15 +55,6 @@ namespace UnitTesting.Tests.Project
Assert.IsTrue(TestMethod.IsTestMethod(mockMethod));
}
[Test]
public void NullAttributeName()
{
List<MockAttribute> attributes = new List<MockAttribute>();
attributes.Add(new MockAttribute(null));
MockMethod mockMethod = CreateMockMethod(attributes);
Assert.IsFalse(TestMethod.IsTestMethod(mockMethod));
}
[Test]
public void NullMethod()
{

26
src/AddIns/Misc/UnitTesting/Test/Utils/MockAttribute.cs

@ -12,15 +12,11 @@ namespace UnitTesting.Tests.Utils @@ -12,15 +12,11 @@ namespace UnitTesting.Tests.Utils
{
public class MockAttribute : IAttribute
{
string name = String.Empty;
public MockAttribute()
{
}
IReturnType type;
public MockAttribute(string name)
{
this.name = name;
type = new DefaultReturnType(new MockClass(name));
}
public AttributeTarget AttributeTarget {
@ -29,18 +25,22 @@ namespace UnitTesting.Tests.Utils @@ -29,18 +25,22 @@ namespace UnitTesting.Tests.Utils
}
}
public string Name {
public IReturnType AttributeType {
get {
return name;
return type;
}
set {
name = value;
}
public System.Collections.Generic.IList<object> PositionalArguments {
get {
throw new NotImplementedException();
}
}
public int CompareTo(object obj)
{
throw new NotImplementedException();
public System.Collections.Generic.IDictionary<string, object> NamedArguments {
get {
throw new NotImplementedException();
}
}
}
}

5
src/AddIns/Misc/UnitTesting/Test/Utils/MockProjectContent.cs

@ -170,5 +170,10 @@ namespace UnitTesting.Tests.Utils @@ -170,5 +170,10 @@ namespace UnitTesting.Tests.Utils
throw new NotImplementedException();
}
}
public IList<IAttribute> GetAssemblyAttributes()
{
throw new NotImplementedException();
}
}
}

Loading…
Cancel
Save