23 changed files with 358 additions and 1926 deletions
@ -1,94 +0,0 @@ |
|||||||
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
|
|
||||||
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
|
||||||
|
|
||||||
using ICSharpCode.SharpDevelop.Dom; |
|
||||||
using ICSharpCode.SharpDevelop.Project; |
|
||||||
using ICSharpCode.UnitTesting; |
|
||||||
using NUnit.Framework; |
|
||||||
using System; |
|
||||||
using System.Collections.Generic; |
|
||||||
using UnitTesting.Tests.Utils; |
|
||||||
|
|
||||||
namespace UnitTesting.Tests.Frameworks |
|
||||||
{ |
|
||||||
[TestFixture] |
|
||||||
public class NUnitTestFrameworkIsTestClassTests |
|
||||||
{ |
|
||||||
NUnitTestFramework testFramework; |
|
||||||
|
|
||||||
[SetUp] |
|
||||||
public void Init() |
|
||||||
{ |
|
||||||
testFramework = new NUnitTestFramework(); |
|
||||||
} |
|
||||||
|
|
||||||
[Test] |
|
||||||
public void IsTestClassReturnsFalseHasClassHasNoAttributes() |
|
||||||
{ |
|
||||||
MockClass mockClass = MockClass.CreateMockClassWithoutAnyAttributes(); |
|
||||||
Assert.IsFalse(testFramework.IsTestClass(mockClass)); |
|
||||||
} |
|
||||||
|
|
||||||
[Test] |
|
||||||
public void IsTestClassReturnsTrueHasClassHasTestFixtureAttributeMissingAttributePart() |
|
||||||
{ |
|
||||||
MockAttribute testAttribute = new MockAttribute("TestFixture"); |
|
||||||
MockClass mockClass = MockClass.CreateMockClassWithAttribute(testAttribute); |
|
||||||
Assert.IsTrue(testFramework.IsTestClass(mockClass)); |
|
||||||
} |
|
||||||
|
|
||||||
[Test] |
|
||||||
public void IsTestClassReturnsFalseWhenClassHasTestFixtureAttributeAndIsAbstract() { |
|
||||||
MockAttribute testAttribute = new MockAttribute("TestFixture"); |
|
||||||
MockClass mockClass = MockClass.CreateMockClassWithAttribute(testAttribute); |
|
||||||
mockClass.Modifiers = mockClass.Modifiers | ModifierEnum.Abstract; |
|
||||||
Assert.IsFalse(testFramework.IsTestClass(mockClass)); |
|
||||||
} |
|
||||||
|
|
||||||
[Test] |
|
||||||
public void IsTestClassReturnsTrueHasClassHasTestFixtureAttribute() |
|
||||||
{ |
|
||||||
MockAttribute testFixtureAttribute = new MockAttribute("TestFixtureAttribute"); |
|
||||||
MockClass mockClass = MockClass.CreateMockClassWithAttribute(testFixtureAttribute); |
|
||||||
Assert.IsTrue(testFramework.IsTestClass(mockClass)); |
|
||||||
} |
|
||||||
|
|
||||||
[Test] |
|
||||||
public void IsTestClassReturnsTrueHasClassHasFullyQualifiedNUnitTestFixtureAttribute() |
|
||||||
{ |
|
||||||
MockAttribute testFixtureAttribute = new MockAttribute("NUnit.Framework.TestFixtureAttribute"); |
|
||||||
MockClass mockClass = MockClass.CreateMockClassWithAttribute(testFixtureAttribute); |
|
||||||
Assert.IsTrue(testFramework.IsTestClass(mockClass)); |
|
||||||
} |
|
||||||
|
|
||||||
[Test] |
|
||||||
public void IsTestClassReturnsFalseWhenClassIsNull() |
|
||||||
{ |
|
||||||
Assert.IsFalse(testFramework.IsTestClass(null)); |
|
||||||
} |
|
||||||
|
|
||||||
[Test] |
|
||||||
public void IsTestClassReturnsFalseWhenProjectContentLanguageIsNull() |
|
||||||
{ |
|
||||||
IProject project = new MockCSharpProject(); |
|
||||||
MockProjectContent mockProjectContent = new MockProjectContent(); |
|
||||||
mockProjectContent.Project = project; |
|
||||||
MockClass mockClass = new MockClass(mockProjectContent); |
|
||||||
|
|
||||||
Assert.IsFalse(testFramework.IsTestClass(mockClass)); |
|
||||||
} |
|
||||||
|
|
||||||
[Test] |
|
||||||
public void IsTestClassReturnsFalseWhenProjectContentLanguageNameComparerIsNull() |
|
||||||
{ |
|
||||||
IProject project = new MockCSharpProject(); |
|
||||||
MockProjectContent mockProjectContent = new MockProjectContent(); |
|
||||||
mockProjectContent.Project = project; |
|
||||||
mockProjectContent.Language = new LanguageProperties(null); |
|
||||||
MockClass mockClass = new MockClass(mockProjectContent); |
|
||||||
mockClass.Attributes.Add(new MockAttribute("Test")); |
|
||||||
|
|
||||||
Assert.IsFalse(testFramework.IsTestClass(mockClass)); |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
@ -1,152 +0,0 @@ |
|||||||
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
|
|
||||||
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
|
||||||
|
|
||||||
using ICSharpCode.SharpDevelop.Dom; |
|
||||||
using ICSharpCode.SharpDevelop.Project; |
|
||||||
using ICSharpCode.UnitTesting; |
|
||||||
using NUnit.Framework; |
|
||||||
using System; |
|
||||||
using System.Collections.Generic; |
|
||||||
using UnitTesting.Tests.Utils; |
|
||||||
|
|
||||||
namespace UnitTesting.Tests.Frameworks |
|
||||||
{ |
|
||||||
[TestFixture] |
|
||||||
public class NUnitTestFrameworkIsTestMemberTests |
|
||||||
{ |
|
||||||
NUnitTestFramework testFramework; |
|
||||||
|
|
||||||
void CreateTestFramework() |
|
||||||
{ |
|
||||||
testFramework = new NUnitTestFramework(); |
|
||||||
} |
|
||||||
|
|
||||||
[Test] |
|
||||||
public void IsTestMember_MethodHasNoAttributes_ReturnsFalse() |
|
||||||
{ |
|
||||||
CreateTestFramework(); |
|
||||||
MockMethod mockMethod = MockMethod.CreateMockMethodWithoutAnyAttributes(); |
|
||||||
|
|
||||||
bool result = testFramework.IsTestMember(mockMethod); |
|
||||||
|
|
||||||
Assert.IsFalse(result); |
|
||||||
} |
|
||||||
|
|
||||||
[Test] |
|
||||||
public void IsTestMember_MethodHasTestAttributeWithoutAttributePart_ReturnsTrue() |
|
||||||
{ |
|
||||||
CreateTestFramework(); |
|
||||||
MockAttribute testAttribute = new MockAttribute("Test"); |
|
||||||
MockMethod mockMethod = MockMethod.CreateMockMethodWithAttribute(testAttribute); |
|
||||||
|
|
||||||
bool result = testFramework.IsTestMember(mockMethod); |
|
||||||
|
|
||||||
Assert.IsTrue(result); |
|
||||||
} |
|
||||||
|
|
||||||
[Test] |
|
||||||
public void IsTestMember_MethodHasTestAttributeAttribute_ReturnsTrue() |
|
||||||
{ |
|
||||||
CreateTestFramework(); |
|
||||||
MockAttribute testAttribute = new MockAttribute("TestAttribute"); |
|
||||||
MockMethod mockMethod = MockMethod.CreateMockMethodWithAttribute(testAttribute); |
|
||||||
|
|
||||||
bool result = testFramework.IsTestMember(mockMethod); |
|
||||||
|
|
||||||
Assert.IsTrue(result); |
|
||||||
} |
|
||||||
|
|
||||||
[Test] |
|
||||||
public void IsTestMember_MethodHasFullyQualifiedNUnitTestAttribute_ReturnsTrue() |
|
||||||
{ |
|
||||||
CreateTestFramework(); |
|
||||||
MockAttribute testAttribute = new MockAttribute("NUnit.Framework.TestAttribute"); |
|
||||||
MockMethod mockMethod = MockMethod.CreateMockMethodWithAttribute(testAttribute); |
|
||||||
|
|
||||||
bool result = testFramework.IsTestMember(mockMethod); |
|
||||||
|
|
||||||
Assert.IsTrue(result); |
|
||||||
} |
|
||||||
|
|
||||||
[Test] |
|
||||||
public void IsTestMember_MethodIsNull_ReturnsFalse() |
|
||||||
{ |
|
||||||
CreateTestFramework(); |
|
||||||
bool result = testFramework.IsTestMember(null); |
|
||||||
|
|
||||||
Assert.IsFalse(result); |
|
||||||
} |
|
||||||
|
|
||||||
[Test] |
|
||||||
public void IsTestMember_ProjectContentLanguageHasNullNameComparer_ReturnsFalse() |
|
||||||
{ |
|
||||||
CreateTestFramework(); |
|
||||||
MockClass mockClass = MockClass.CreateMockClassWithoutAnyAttributes(); |
|
||||||
mockClass.MockProjectContent.Language = new LanguageProperties(null); |
|
||||||
var mockMethod = new MockMethod(mockClass); |
|
||||||
mockMethod.Attributes.Add(new MockAttribute("Test")); |
|
||||||
|
|
||||||
bool result = testFramework.IsTestMember(mockMethod); |
|
||||||
|
|
||||||
Assert.IsFalse(result); |
|
||||||
} |
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Even if the project is null the method should be
|
|
||||||
/// flagged as a TestMethod.
|
|
||||||
/// </summary>
|
|
||||||
[Test] |
|
||||||
public void IsTestMember_ProjectIsNull_ReturnsTrue() |
|
||||||
{ |
|
||||||
CreateTestFramework(); |
|
||||||
var testAttribute = new MockAttribute("Test"); |
|
||||||
MockMethod mockMethod = MockMethod.CreateMockMethodWithAttribute(testAttribute); |
|
||||||
MockProjectContent mockProjectContent = (MockProjectContent)mockMethod.DeclaringType.ProjectContent; |
|
||||||
mockProjectContent.Project = null; |
|
||||||
|
|
||||||
bool result = testFramework.IsTestMember(mockMethod); |
|
||||||
|
|
||||||
Assert.IsTrue(result); |
|
||||||
} |
|
||||||
|
|
||||||
[Test] |
|
||||||
public void IsTestMember_MethodHasNullLanguage_ReturnsFalse() |
|
||||||
{ |
|
||||||
CreateTestFramework(); |
|
||||||
MockClass mockClass = MockClass.CreateMockClassWithoutAnyAttributes(); |
|
||||||
mockClass.MockProjectContent.Language = null; |
|
||||||
var mockMethod = new MockMethod(mockClass); |
|
||||||
bool result = testFramework.IsTestMember(mockMethod); |
|
||||||
|
|
||||||
Assert.IsFalse(result); |
|
||||||
} |
|
||||||
|
|
||||||
[Test] |
|
||||||
public void IsTestMember_MethodHasParameters_ReturnsFalse() |
|
||||||
{ |
|
||||||
CreateTestFramework(); |
|
||||||
var testAttribute = new MockAttribute("Test"); |
|
||||||
MockMethod mockMethod = MockMethod.CreateMockMethodWithAttribute(testAttribute); |
|
||||||
var mockParameter = new MockParameter(); |
|
||||||
mockMethod.Parameters.Add(mockParameter); |
|
||||||
|
|
||||||
bool result = testFramework.IsTestMember(mockMethod); |
|
||||||
|
|
||||||
Assert.IsFalse(result); |
|
||||||
} |
|
||||||
|
|
||||||
[Test] |
|
||||||
public void IsTestMember_FieldHasOneAttribute_ReturnsFalseAndDoesNotThrowInvalidCastException() |
|
||||||
{ |
|
||||||
CreateTestFramework(); |
|
||||||
MockClass mockClass = MockClass.CreateMockClassWithoutAnyAttributes(); |
|
||||||
var field = new DefaultField(mockClass, "MyField"); |
|
||||||
var testAttribute = new MockAttribute("Test"); |
|
||||||
field.Attributes.Add(testAttribute); |
|
||||||
|
|
||||||
bool result = testFramework.IsTestMember(field); |
|
||||||
|
|
||||||
Assert.IsFalse(result); |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
@ -1,89 +0,0 @@ |
|||||||
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
|
|
||||||
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
|
||||||
|
|
||||||
using System; |
|
||||||
using System.Collections.Generic; |
|
||||||
using ICSharpCode.Core; |
|
||||||
using ICSharpCode.UnitTesting; |
|
||||||
using NUnit.Framework; |
|
||||||
using UnitTesting.Tests.Utils; |
|
||||||
|
|
||||||
namespace UnitTesting.Tests.Frameworks |
|
||||||
{ |
|
||||||
[TestFixture] |
|
||||||
public class TestFrameworkDoozerTests |
|
||||||
{ |
|
||||||
Properties properties; |
|
||||||
TestFrameworkDescriptor descriptor; |
|
||||||
TestFrameworkDoozer doozer; |
|
||||||
MockTestFramework mockTestFramework; |
|
||||||
MockTestFrameworkFactory mockTestFrameworkFactory; |
|
||||||
|
|
||||||
void CreateDoozer() |
|
||||||
{ |
|
||||||
properties = new Properties(); |
|
||||||
properties["id"] = "Default"; |
|
||||||
properties["class"] = "UnitTesting.Tests.Utils.MockTestFramework"; |
|
||||||
Codon codon = new Codon(null, "TestFramework", properties, null); |
|
||||||
|
|
||||||
mockTestFrameworkFactory = new MockTestFrameworkFactory(); |
|
||||||
mockTestFramework = mockTestFrameworkFactory.AddFakeTestFramework("UnitTesting.Tests.Utils.MockTestFramework"); |
|
||||||
|
|
||||||
doozer = new TestFrameworkDoozer(); |
|
||||||
descriptor = doozer.BuildItem(codon, mockTestFrameworkFactory); |
|
||||||
} |
|
||||||
|
|
||||||
[Test] |
|
||||||
public void Id_PropertiesIdIsDefault_ReturnsDefault() |
|
||||||
{ |
|
||||||
CreateDoozer(); |
|
||||||
properties["id"] = "Default"; |
|
||||||
|
|
||||||
string id = descriptor.Id; |
|
||||||
|
|
||||||
Assert.AreEqual("Default", id); |
|
||||||
} |
|
||||||
|
|
||||||
[Test] |
|
||||||
public void IDoozer_TestFrameworkDoozer_ImplementsIDoozer() |
|
||||||
{ |
|
||||||
CreateDoozer(); |
|
||||||
IDoozer implementsDoozer = doozer as IDoozer; |
|
||||||
|
|
||||||
Assert.IsNotNull(implementsDoozer); |
|
||||||
} |
|
||||||
|
|
||||||
[Test] |
|
||||||
public void HandleConditions_TestFrameworkDoozerDoesNotHandleConditions_ReturnsFalse() |
|
||||||
{ |
|
||||||
CreateDoozer(); |
|
||||||
bool conditions = doozer.HandleConditions; |
|
||||||
|
|
||||||
Assert.IsFalse(conditions); |
|
||||||
} |
|
||||||
|
|
||||||
[Test] |
|
||||||
public void TestFramework_TestFrameworkDescriptorTestFrameworkProperty_ReturnsMockTestFrameworkObject() |
|
||||||
{ |
|
||||||
CreateDoozer(); |
|
||||||
bool result = descriptor.TestFramework is MockTestFramework; |
|
||||||
|
|
||||||
Assert.IsTrue(result); |
|
||||||
} |
|
||||||
|
|
||||||
[Test] |
|
||||||
public void TestFramework_PropertyAccessTwice_OnlyOneObjectCreated() |
|
||||||
{ |
|
||||||
CreateDoozer(); |
|
||||||
ITestFramework testFramework = descriptor.TestFramework; |
|
||||||
testFramework = descriptor.TestFramework; |
|
||||||
|
|
||||||
List<string> expectedClassNames = new List<string>(); |
|
||||||
expectedClassNames.Add("UnitTesting.Tests.Utils.MockTestFramework"); |
|
||||||
|
|
||||||
List<string> classNamesCreated = mockTestFrameworkFactory.ClassNamesPassedToCreateMethod; |
|
||||||
|
|
||||||
Assert.AreEqual(expectedClassNames, classNamesCreated); |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
@ -0,0 +1,121 @@ |
|||||||
|
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
|
||||||
|
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
||||||
|
|
||||||
|
using ICSharpCode.SharpDevelop.Dom; |
||||||
|
using ICSharpCode.SharpDevelop.Project; |
||||||
|
using ICSharpCode.UnitTesting; |
||||||
|
using NUnit.Framework; |
||||||
|
using System; |
||||||
|
using System.Collections.Generic; |
||||||
|
using UnitTesting.Tests.Utils; |
||||||
|
|
||||||
|
namespace UnitTesting.Tests.NUnit |
||||||
|
{ |
||||||
|
[TestFixture] |
||||||
|
public class NUnitTestFrameworkIsTestClassTests |
||||||
|
{ |
||||||
|
NUnitTestFramework testFramework; |
||||||
|
|
||||||
|
[SetUp] |
||||||
|
public void Init() |
||||||
|
{ |
||||||
|
testFramework = new NUnitTestFramework(); |
||||||
|
} |
||||||
|
|
||||||
|
[Test] |
||||||
|
public void IsTestClassReturnsFalseHasClassHasNoAttributes() |
||||||
|
{ |
||||||
|
var c = NRefactoryHelper.CreateTypeDefinition("class EmptyClass {}"); |
||||||
|
Assert.IsFalse(NUnitTestFramework.IsTestClass(c)); |
||||||
|
} |
||||||
|
|
||||||
|
[Test] |
||||||
|
public void IsTestClassReturnsTrueHasClassHasTestFixtureAttributeMissingAttributePart() |
||||||
|
{ |
||||||
|
var c = NRefactoryHelper.CreateTypeDefinition("using NUnit.Framework; [TestFixture] class EmptyClass {}"); |
||||||
|
Assert.IsTrue(NUnitTestFramework.IsTestClass(c)); |
||||||
|
} |
||||||
|
|
||||||
|
[Test] |
||||||
|
public void IsTestClassReturnsFalseWhenClassHasTestFixtureAttributeAndIsAbstract() { |
||||||
|
var c = NRefactoryHelper.CreateTypeDefinition("using NUnit.Framework; [TestFixture] abstract class EmptyClass {}"); |
||||||
|
Assert.IsFalse(NUnitTestFramework.IsTestClass(c)); |
||||||
|
} |
||||||
|
|
||||||
|
[Test] |
||||||
|
public void IsTestClassReturnsTrueHasClassHasTestFixtureAttribute() |
||||||
|
{ |
||||||
|
var c = NRefactoryHelper.CreateTypeDefinition("using NUnit.Framework; [TestFixtureAttribute] class EmptyClass {}"); |
||||||
|
Assert.IsTrue(NUnitTestFramework.IsTestClass(c)); |
||||||
|
} |
||||||
|
|
||||||
|
[Test] |
||||||
|
public void IsTestClassReturnsTrueHasClassHasFullyQualifiedNUnitTestFixtureAttribute() |
||||||
|
{ |
||||||
|
var c = NRefactoryHelper.CreateTypeDefinition("[NUnit.Framework.TestFixtureAttribute] class EmptyClass {}"); |
||||||
|
Assert.IsTrue(NUnitTestFramework.IsTestClass(c)); |
||||||
|
} |
||||||
|
|
||||||
|
[Test] |
||||||
|
public void IsTestClassReturnsFalseWhenClassIsNull() |
||||||
|
{ |
||||||
|
Assert.IsFalse(NUnitTestFramework.IsTestClass(null)); |
||||||
|
} |
||||||
|
|
||||||
|
[Test] |
||||||
|
public void IsTestClassReturnsFalseWhenClassHasTestAttributeWithoutUsingNUnit() |
||||||
|
{ |
||||||
|
var c = NRefactoryHelper.CreateTypeDefinition("class C { [Test] public void M() {} }"); |
||||||
|
Assert.IsFalse(NUnitTestFramework.IsTestClass(c)); |
||||||
|
} |
||||||
|
|
||||||
|
[Test] |
||||||
|
public void IsTestClassReturnsTrueWhenContainingTestMethod() |
||||||
|
{ |
||||||
|
var c = NRefactoryHelper.CreateTypeDefinition("using NUnit.Framework; class C { [Test] public void M() {} }"); |
||||||
|
Assert.IsTrue(NUnitTestFramework.IsTestClass(c)); |
||||||
|
} |
||||||
|
|
||||||
|
[Test] |
||||||
|
public void IsTestClassReturnsTrueWhenContainingTestCase() |
||||||
|
{ |
||||||
|
var c = NRefactoryHelper.CreateTypeDefinition("using NUnit.Framework; class C { [TestCase(1)] public void M(int i) {} }"); |
||||||
|
Assert.IsTrue(NUnitTestFramework.IsTestClass(c)); |
||||||
|
} |
||||||
|
|
||||||
|
[Test] |
||||||
|
public void IsTestClassReturnsFalseWhenAbstractClassContainsTestMethod() |
||||||
|
{ |
||||||
|
var c = NRefactoryHelper.CreateTypeDefinition("using NUnit.Framework; abstract class C { [Test] public void M() {} }"); |
||||||
|
Assert.IsFalse(NUnitTestFramework.IsTestClass(c)); |
||||||
|
} |
||||||
|
|
||||||
|
[Test] |
||||||
|
public void IsTestClassReturnsTrueWhenContainingInnerClassWithTestMethod() |
||||||
|
{ |
||||||
|
var c = NRefactoryHelper.CreateTypeDefinition("using NUnit.Framework; class C { class Inner { [Test] public void M() {} } }"); |
||||||
|
Assert.IsTrue(NUnitTestFramework.IsTestClass(c)); |
||||||
|
} |
||||||
|
|
||||||
|
[Test] |
||||||
|
public void IsTestClassReturnsTrueWhenAbstractClassContainsInnerClassWithTestMethod() |
||||||
|
{ |
||||||
|
var c = NRefactoryHelper.CreateTypeDefinition("using NUnit.Framework; abstract class C { class Inner { [Test] public void M() {} } }"); |
||||||
|
Assert.IsTrue(NUnitTestFramework.IsTestClass(c)); |
||||||
|
} |
||||||
|
|
||||||
|
[Test] |
||||||
|
public void IsTestClassReturnsTrueWhenStaticClassWithTestMethod() |
||||||
|
{ |
||||||
|
var c = NRefactoryHelper.CreateTypeDefinition("using NUnit.Framework; static class C { [Test] public static void M() {} }"); |
||||||
|
Assert.IsTrue(NUnitTestFramework.IsTestClass(c)); |
||||||
|
} |
||||||
|
|
||||||
|
[Test] |
||||||
|
public void IsTestClassReturnsTrueWhenStaticClassWithAttribute() |
||||||
|
{ |
||||||
|
var c = NRefactoryHelper.CreateTypeDefinition("using NUnit.Framework; [TestFixture] static class C { }"); |
||||||
|
Assert.IsTrue(NUnitTestFramework.IsTestClass(c)); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,89 @@ |
|||||||
|
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
|
||||||
|
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
||||||
|
|
||||||
|
using System.Linq; |
||||||
|
using ICSharpCode.NRefactory.TypeSystem; |
||||||
|
using ICSharpCode.SharpDevelop.Dom; |
||||||
|
using ICSharpCode.SharpDevelop.Project; |
||||||
|
using ICSharpCode.UnitTesting; |
||||||
|
using NUnit.Framework; |
||||||
|
using System; |
||||||
|
using System.Collections.Generic; |
||||||
|
using UnitTesting.Tests.Utils; |
||||||
|
|
||||||
|
namespace UnitTesting.Tests.NUnit |
||||||
|
{ |
||||||
|
[TestFixture] |
||||||
|
public class NUnitTestFrameworkIsTestMemberTests |
||||||
|
{ |
||||||
|
IMethod CreateMethod(string code) |
||||||
|
{ |
||||||
|
var c = NRefactoryHelper.CreateTypeDefinition("using NUnit.Framework; class C { " + code + " } "); |
||||||
|
return c.Methods.First(); |
||||||
|
} |
||||||
|
|
||||||
|
[Test] |
||||||
|
public void IsTestMember_MethodHasNoAttributes_ReturnsFalse() |
||||||
|
{ |
||||||
|
var m = CreateMethod("public void M() {}"); |
||||||
|
Assert.IsFalse(NUnitTestFramework.IsTestMethod(m)); |
||||||
|
} |
||||||
|
|
||||||
|
[Test] |
||||||
|
public void IsTestMember_MethodHasTestAttributeWithoutAttributePart_ReturnsTrue() |
||||||
|
{ |
||||||
|
var m = CreateMethod("[Test] public void M() {}"); |
||||||
|
Assert.IsTrue(NUnitTestFramework.IsTestMethod(m)); |
||||||
|
} |
||||||
|
|
||||||
|
[Test] |
||||||
|
public void IsTestMember_MethodHasTestAttributeAttribute_ReturnsTrue() |
||||||
|
{ |
||||||
|
var m = CreateMethod("[TestAttribute] public void M() {}"); |
||||||
|
Assert.IsTrue(NUnitTestFramework.IsTestMethod(m)); |
||||||
|
} |
||||||
|
|
||||||
|
[Test] |
||||||
|
public void IsTestMember_MethodHasFullyQualifiedNUnitTestAttribute_ReturnsTrue() |
||||||
|
{ |
||||||
|
var m = CreateMethod("[NUnit.Framework.TestAttribute] public void M() {}"); |
||||||
|
Assert.IsTrue(NUnitTestFramework.IsTestMethod(m)); |
||||||
|
} |
||||||
|
|
||||||
|
[Test] |
||||||
|
public void IsTestMember_MethodIsNull_ReturnsFalse() |
||||||
|
{ |
||||||
|
Assert.IsFalse(NUnitTestFramework.IsTestMethod(null)); |
||||||
|
} |
||||||
|
|
||||||
|
[Test] |
||||||
|
public void IsTestMember_MethodHasParameters_ReturnsTrue() |
||||||
|
{ |
||||||
|
// not actually executable, but NUnit still considers it a test case
|
||||||
|
// and marks it as ignored
|
||||||
|
var m = CreateMethod("[Test] public void M(int a) {}"); |
||||||
|
Assert.IsTrue(NUnitTestFramework.IsTestMethod(m)); |
||||||
|
} |
||||||
|
|
||||||
|
[Test] |
||||||
|
public void IsTestMember_MethodIsStatic_ReturnsTrue() |
||||||
|
{ |
||||||
|
var m = CreateMethod("[Test] public static void M() {}"); |
||||||
|
Assert.IsTrue(NUnitTestFramework.IsTestMethod(m)); |
||||||
|
} |
||||||
|
|
||||||
|
[Test] |
||||||
|
public void TestCase() |
||||||
|
{ |
||||||
|
var m = CreateMethod("[TestCase] public void M() {}"); |
||||||
|
Assert.IsTrue(NUnitTestFramework.IsTestMethod(m)); |
||||||
|
} |
||||||
|
|
||||||
|
[Test] |
||||||
|
public void TestCase_WithParameter() |
||||||
|
{ |
||||||
|
var m = CreateMethod("[TestCase(1), TestCase(2)] public void M(int x) {}"); |
||||||
|
Assert.IsTrue(NUnitTestFramework.IsTestMethod(m)); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
@ -1,98 +0,0 @@ |
|||||||
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
|
|
||||||
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
|
||||||
|
|
||||||
using System; |
|
||||||
using ICSharpCode.Core; |
|
||||||
using ICSharpCode.SharpDevelop.Project; |
|
||||||
using NUnit.Framework; |
|
||||||
using ICSharpCode.UnitTesting; |
|
||||||
using UnitTesting.Tests.Utils; |
|
||||||
|
|
||||||
namespace UnitTesting.Tests |
|
||||||
{ |
|
||||||
/// <summary>
|
|
||||||
/// If the project explicitly targets 32 bit (x86) architecture then nunit-console-x86.exe should be
|
|
||||||
/// used. Otherwise the normal nunit-console.exe is used.
|
|
||||||
/// </summary>
|
|
||||||
[TestFixture] |
|
||||||
public class NUnitConsoleExeSelectedTestFixture |
|
||||||
{ |
|
||||||
string oldRootPath; |
|
||||||
|
|
||||||
[TestFixtureSetUpAttribute] |
|
||||||
public void SetUpFixture() |
|
||||||
{ |
|
||||||
oldRootPath = FileUtility.ApplicationRootPath; |
|
||||||
FileUtility.ApplicationRootPath = @"D:\SharpDevelop"; |
|
||||||
} |
|
||||||
|
|
||||||
[TestFixtureTearDown] |
|
||||||
public void TearDownFixture() |
|
||||||
{ |
|
||||||
FileUtility.ApplicationRootPath = oldRootPath; |
|
||||||
} |
|
||||||
|
|
||||||
[Test] |
|
||||||
public void NothingSpecified() |
|
||||||
{ |
|
||||||
MockCSharpProject project = new MockCSharpProject(); |
|
||||||
UnitTestApplicationStartHelper helper = new UnitTestApplicationStartHelper(); |
|
||||||
helper.Initialize(project, null); |
|
||||||
Assert.AreEqual(@"D:\SharpDevelop\bin\Tools\NUnit\nunit-console-dotnet2-x86.exe", helper.UnitTestApplication); |
|
||||||
} |
|
||||||
|
|
||||||
|
|
||||||
[Test] |
|
||||||
public void TargetCpuAnyCPUDotnet2() |
|
||||||
{ |
|
||||||
MockCSharpProject project = new MockCSharpProject(); |
|
||||||
project.ActiveConfiguration = "Debug"; |
|
||||||
project.ActivePlatform = "AnyCPU"; |
|
||||||
project.SetProperty("PlatformTarget", "AnyCPU"); |
|
||||||
project.SetProperty("TargetFrameworkVersion", "v3.5"); |
|
||||||
|
|
||||||
UnitTestApplicationStartHelper helper = new UnitTestApplicationStartHelper(); |
|
||||||
helper.Initialize(project, null); |
|
||||||
Assert.AreEqual(@"D:\SharpDevelop\bin\Tools\NUnit\nunit-console-dotnet2.exe", helper.UnitTestApplication); |
|
||||||
} |
|
||||||
|
|
||||||
[Test] |
|
||||||
public void NUnitConsole32BitUsedWhenTargetCpuIs32BitDotnet2() |
|
||||||
{ |
|
||||||
MockCSharpProject project = new MockCSharpProject(); |
|
||||||
project.ActiveConfiguration = "Debug"; |
|
||||||
project.ActivePlatform = "AnyCPU"; |
|
||||||
project.SetProperty("PlatformTarget", "x86"); |
|
||||||
project.SetProperty("TargetFrameworkVersion", "v3.5"); |
|
||||||
|
|
||||||
UnitTestApplicationStartHelper helper = new UnitTestApplicationStartHelper(); |
|
||||||
helper.Initialize(project, null); |
|
||||||
Assert.AreEqual(@"D:\SharpDevelop\bin\Tools\NUnit\nunit-console-dotnet2-x86.exe", helper.UnitTestApplication); |
|
||||||
} |
|
||||||
|
|
||||||
[Test] |
|
||||||
public void NUnitConsole32BitUsedWhenTargetCpuIs32Bit() |
|
||||||
{ |
|
||||||
MockCSharpProject project = new MockCSharpProject(); |
|
||||||
project.ActiveConfiguration = "Debug"; |
|
||||||
project.ActivePlatform = "AnyCPU"; |
|
||||||
project.SetProperty("PlatformTarget", "x86"); |
|
||||||
project.SetProperty("TargetFrameworkVersion", "v4.0"); |
|
||||||
|
|
||||||
UnitTestApplicationStartHelper helper = new UnitTestApplicationStartHelper(); |
|
||||||
helper.Initialize(project, null); |
|
||||||
Assert.AreEqual(@"D:\SharpDevelop\bin\Tools\NUnit\nunit-console-x86.exe", helper.UnitTestApplication); |
|
||||||
} |
|
||||||
|
|
||||||
[Test] |
|
||||||
public void NotMSBuildBasedProject() |
|
||||||
{ |
|
||||||
MissingProject project = new MissingProject(@"C:\Projects\Test.proj", "Test"); |
|
||||||
UnitTestApplicationStartHelper helper = new UnitTestApplicationStartHelper(); |
|
||||||
helper.Initialize(project, null); |
|
||||||
|
|
||||||
Assert.AreEqual(project.GetType().BaseType, typeof(AbstractProject), "MissingProject should be derived from AbstractProject."); |
|
||||||
Assert.AreEqual(@"D:\SharpDevelop\bin\Tools\NUnit\nunit-console.exe", helper.UnitTestApplication); |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
@ -1,224 +0,0 @@ |
|||||||
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
|
|
||||||
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
|
||||||
|
|
||||||
using System; |
|
||||||
using ICSharpCode.Core; |
|
||||||
using ICSharpCode.SharpDevelop.Project; |
|
||||||
using ICSharpCode.UnitTesting; |
|
||||||
using NUnit.Framework; |
|
||||||
using UnitTesting.Tests.Utils; |
|
||||||
|
|
||||||
namespace UnitTesting.Tests |
|
||||||
{ |
|
||||||
[TestFixture] |
|
||||||
public class UnitTestCommandLineTests |
|
||||||
{ |
|
||||||
CompilableProject project; |
|
||||||
UnitTestApplicationStartHelper helper; |
|
||||||
|
|
||||||
[SetUp] |
|
||||||
public void SetUp() |
|
||||||
{ |
|
||||||
project = new MockCSharpProject(); |
|
||||||
project.FileName = @"C:\Projects\MyTests\MyTests.csproj"; |
|
||||||
project.AssemblyName = "MyTests"; |
|
||||||
project.OutputType = OutputType.Library; |
|
||||||
project.SetProperty("OutputPath", "."); // don't create bin/Debug
|
|
||||||
project.SetProperty("TargetFrameworkVersion", "v4.0"); |
|
||||||
helper = new UnitTestApplicationStartHelper(); |
|
||||||
} |
|
||||||
|
|
||||||
[Test] |
|
||||||
public void TestResultsFile() |
|
||||||
{ |
|
||||||
helper.Initialize(project, null, null); |
|
||||||
helper.NoLogo = false; |
|
||||||
helper.ShadowCopy = true; |
|
||||||
helper.Results = @"C:\results.txt"; |
|
||||||
|
|
||||||
string expectedCommandLine = "\"C:\\Projects\\MyTests\\MyTests.dll\" /results=\"C:\\results.txt\""; |
|
||||||
Assert.AreEqual(expectedCommandLine, helper.GetArguments()); |
|
||||||
} |
|
||||||
|
|
||||||
[Test] |
|
||||||
public void NoLogo() |
|
||||||
{ |
|
||||||
helper.Initialize(project, null, null); |
|
||||||
helper.NoLogo = true; |
|
||||||
helper.ShadowCopy = true; |
|
||||||
|
|
||||||
string expectedCommandLine = "\"C:\\Projects\\MyTests\\MyTests.dll\" /nologo"; |
|
||||||
Assert.AreEqual(expectedCommandLine, helper.GetArguments()); |
|
||||||
} |
|
||||||
|
|
||||||
[Test] |
|
||||||
public void NoShadowCopy() |
|
||||||
{ |
|
||||||
helper.Initialize(project, null, null); |
|
||||||
helper.NoLogo = false; |
|
||||||
helper.ShadowCopy = false; |
|
||||||
|
|
||||||
string expectedCommandLine = "\"C:\\Projects\\MyTests\\MyTests.dll\" /noshadow"; |
|
||||||
Assert.AreEqual(expectedCommandLine, helper.GetArguments()); |
|
||||||
} |
|
||||||
|
|
||||||
[Test] |
|
||||||
public void NoThread() |
|
||||||
{ |
|
||||||
helper.Initialize(project, null, null); |
|
||||||
helper.NoLogo = false; |
|
||||||
helper.ShadowCopy = true; |
|
||||||
helper.NoThread = true; |
|
||||||
|
|
||||||
string expectedCommandLine = "\"C:\\Projects\\MyTests\\MyTests.dll\" /nothread"; |
|
||||||
Assert.AreEqual(expectedCommandLine, helper.GetArguments()); |
|
||||||
} |
|
||||||
|
|
||||||
[Test] |
|
||||||
public void NoDots() |
|
||||||
{ |
|
||||||
helper.Initialize(project, null, null); |
|
||||||
helper.NoLogo = false; |
|
||||||
helper.ShadowCopy = true; |
|
||||||
helper.NoDots = true; |
|
||||||
|
|
||||||
string expectedCommandLine = "\"C:\\Projects\\MyTests\\MyTests.dll\" /nodots"; |
|
||||||
Assert.AreEqual(expectedCommandLine, helper.GetArguments()); |
|
||||||
} |
|
||||||
|
|
||||||
[Test] |
|
||||||
public void Labels() |
|
||||||
{ |
|
||||||
helper.Initialize(project, null, null); |
|
||||||
helper.NoLogo = false; |
|
||||||
helper.ShadowCopy = true; |
|
||||||
helper.Labels = true; |
|
||||||
|
|
||||||
string expectedCommandLine = "\"C:\\Projects\\MyTests\\MyTests.dll\" /labels"; |
|
||||||
Assert.AreEqual(expectedCommandLine, helper.GetArguments()); |
|
||||||
} |
|
||||||
|
|
||||||
[Test] |
|
||||||
public void TestFixture() |
|
||||||
{ |
|
||||||
helper.Initialize(project, null, null); |
|
||||||
helper.NoLogo = false; |
|
||||||
helper.ShadowCopy = true; |
|
||||||
helper.Fixture = "TestFixture"; |
|
||||||
|
|
||||||
string expectedCommandLine = "\"C:\\Projects\\MyTests\\MyTests.dll\" /run=\"TestFixture\""; |
|
||||||
Assert.AreEqual(expectedCommandLine, helper.GetArguments()); |
|
||||||
} |
|
||||||
|
|
||||||
[Test] |
|
||||||
public void TestNamespace() |
|
||||||
{ |
|
||||||
helper.Initialize(project, null, null); |
|
||||||
helper.NoLogo = false; |
|
||||||
helper.ShadowCopy = true; |
|
||||||
helper.NamespaceFilter = "TestFixture"; |
|
||||||
|
|
||||||
string expectedCommandLine = "\"C:\\Projects\\MyTests\\MyTests.dll\" /run=\"TestFixture\""; |
|
||||||
Assert.AreEqual(expectedCommandLine, helper.GetArguments()); |
|
||||||
} |
|
||||||
|
|
||||||
[Test] |
|
||||||
public void XmlOutputFile() |
|
||||||
{ |
|
||||||
helper.Initialize(project, null, null); |
|
||||||
helper.NoLogo = false; |
|
||||||
helper.ShadowCopy = true; |
|
||||||
helper.XmlOutputFile = @"C:\NUnit.xml"; |
|
||||||
|
|
||||||
string expectedCommandLine = "\"C:\\Projects\\MyTests\\MyTests.dll\" /xml=\"C:\\NUnit.xml\""; |
|
||||||
Assert.AreEqual(expectedCommandLine, helper.GetArguments()); |
|
||||||
} |
|
||||||
|
|
||||||
[Test] |
|
||||||
public void TestMethod() |
|
||||||
{ |
|
||||||
helper.Initialize(project, null, null); |
|
||||||
helper.NoLogo = false; |
|
||||||
helper.ShadowCopy = true; |
|
||||||
helper.Fixture = "TestFixture"; |
|
||||||
helper.Test = "Test"; |
|
||||||
|
|
||||||
string expectedCommandLine = "\"C:\\Projects\\MyTests\\MyTests.dll\" /run=\"TestFixture.Test\""; |
|
||||||
Assert.AreEqual(expectedCommandLine, helper.GetArguments()); |
|
||||||
} |
|
||||||
|
|
||||||
[Test] |
|
||||||
public void TestMethodSpecifiedInInitialize() |
|
||||||
{ |
|
||||||
MockClass testFixture = new MockClass("TestFixture"); |
|
||||||
MockMethod testMethod = new MockMethod("Test"); |
|
||||||
helper.Initialize(project, testFixture, testMethod); |
|
||||||
helper.NoLogo = false; |
|
||||||
helper.ShadowCopy = true; |
|
||||||
|
|
||||||
string expectedCommandLine = "\"C:\\Projects\\MyTests\\MyTests.dll\" /run=\"TestFixture.Test\""; |
|
||||||
Assert.AreEqual(expectedCommandLine, helper.GetArguments()); |
|
||||||
} |
|
||||||
|
|
||||||
[Test] |
|
||||||
public void TestNamespaceSpecifiedInInitialize() |
|
||||||
{ |
|
||||||
helper.Initialize(project, "Project.MyTests"); |
|
||||||
helper.NoLogo = false; |
|
||||||
helper.ShadowCopy = true; |
|
||||||
|
|
||||||
string expectedCommandLine = "\"C:\\Projects\\MyTests\\MyTests.dll\" /run=\"Project.MyTests\""; |
|
||||||
Assert.AreEqual(expectedCommandLine, helper.GetArguments()); |
|
||||||
} |
|
||||||
|
|
||||||
[Test] |
|
||||||
public void FullCommandLine() |
|
||||||
{ |
|
||||||
helper.Initialize(project, null, null); |
|
||||||
helper.NoLogo = true; |
|
||||||
helper.ShadowCopy = true; |
|
||||||
|
|
||||||
FileUtility.ApplicationRootPath = @"C:\SharpDevelop"; |
|
||||||
|
|
||||||
string expectedFullCommandLine = "\"C:\\SharpDevelop\\bin\\Tools\\NUnit\\nunit-console-x86.exe\" \"C:\\Projects\\MyTests\\MyTests.dll\" /nologo"; |
|
||||||
Assert.AreEqual(expectedFullCommandLine, helper.GetCommandLine()); |
|
||||||
} |
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Tests that a space is appended between the items added
|
|
||||||
/// to the UnitTestApplicationStartHelper.Assemblies
|
|
||||||
/// when the command line is generated.
|
|
||||||
/// </summary>
|
|
||||||
[Test] |
|
||||||
public void SecondAssemblySpecified() |
|
||||||
{ |
|
||||||
helper.Initialize(project, null, null); |
|
||||||
helper.Assemblies.Add("SecondAssembly.dll"); |
|
||||||
helper.NoLogo = false; |
|
||||||
helper.ShadowCopy = true; |
|
||||||
helper.Results = @"C:\results.txt"; |
|
||||||
|
|
||||||
string expectedCommandLine = "\"C:\\Projects\\MyTests\\MyTests.dll\" \"SecondAssembly.dll\" /results=\"C:\\results.txt\""; |
|
||||||
Assert.AreEqual(expectedCommandLine, helper.GetArguments()); |
|
||||||
} |
|
||||||
|
|
||||||
[Test] |
|
||||||
public void GetProject() |
|
||||||
{ |
|
||||||
helper.Initialize(project, null, null); |
|
||||||
Assert.AreSame(project, helper.Project); |
|
||||||
} |
|
||||||
|
|
||||||
[Test] |
|
||||||
public void TestInnerClassSpecifiedInInitialize() |
|
||||||
{ |
|
||||||
MockClass testFixture = new MockClass("MyTests.TestFixture.InnerTest", "MyTests.TestFixture+InnerTest"); |
|
||||||
helper.Initialize(project, testFixture, null); |
|
||||||
helper.NoLogo = false; |
|
||||||
helper.ShadowCopy = true; |
|
||||||
|
|
||||||
string expectedCommandLine = "\"C:\\Projects\\MyTests\\MyTests.dll\" /run=\"MyTests.TestFixture+InnerTest\""; |
|
||||||
Assert.AreEqual(expectedCommandLine, helper.GetArguments()); |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
@ -0,0 +1,113 @@ |
|||||||
|
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
|
||||||
|
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
||||||
|
|
||||||
|
using System; |
||||||
|
using System.Threading; |
||||||
|
using System.Threading.Tasks; |
||||||
|
|
||||||
|
namespace ICSharpCode.SharpDevelop |
||||||
|
{ |
||||||
|
/// <summary>
|
||||||
|
/// A fake message lop that always has <c>InvokeRequired=false</c> and synchronously invokes
|
||||||
|
/// the callback passed to <c>InvokeIfRequired</c>.
|
||||||
|
/// </summary>
|
||||||
|
public class FakeMessageLoop : IMessageLoop |
||||||
|
{ |
||||||
|
public Thread Thread { |
||||||
|
get { |
||||||
|
throw new NotImplementedException(); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
public System.Windows.Threading.Dispatcher Dispatcher { |
||||||
|
get { |
||||||
|
throw new NotImplementedException(); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
public SynchronizationContext SynchronizationContext { |
||||||
|
get { |
||||||
|
throw new NotImplementedException(); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
public System.ComponentModel.ISynchronizeInvoke SynchronizingObject { |
||||||
|
get { |
||||||
|
throw new NotImplementedException(); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
public bool InvokeRequired { |
||||||
|
get { return false; } |
||||||
|
} |
||||||
|
|
||||||
|
public bool CheckAccess() |
||||||
|
{ |
||||||
|
return true; |
||||||
|
} |
||||||
|
|
||||||
|
public void VerifyAccess() |
||||||
|
{ |
||||||
|
} |
||||||
|
|
||||||
|
public void InvokeIfRequired(Action callback) |
||||||
|
{ |
||||||
|
callback(); |
||||||
|
} |
||||||
|
|
||||||
|
public void InvokeIfRequired(Action callback, System.Windows.Threading.DispatcherPriority priority) |
||||||
|
{ |
||||||
|
callback(); |
||||||
|
} |
||||||
|
|
||||||
|
public void InvokeIfRequired(Action callback, System.Windows.Threading.DispatcherPriority priority, CancellationToken cancellationToken) |
||||||
|
{ |
||||||
|
callback(); |
||||||
|
} |
||||||
|
|
||||||
|
public T InvokeIfRequired<T>(Func<T> callback) |
||||||
|
{ |
||||||
|
return callback(); |
||||||
|
} |
||||||
|
|
||||||
|
public T InvokeIfRequired<T>(Func<T> callback, System.Windows.Threading.DispatcherPriority priority) |
||||||
|
{ |
||||||
|
return callback(); |
||||||
|
} |
||||||
|
|
||||||
|
public T InvokeIfRequired<T>(Func<T> callback, System.Windows.Threading.DispatcherPriority priority, CancellationToken cancellationToken) |
||||||
|
{ |
||||||
|
return callback(); |
||||||
|
} |
||||||
|
|
||||||
|
public Task InvokeAsync(Action callback) |
||||||
|
{ |
||||||
|
throw new NotImplementedException(); |
||||||
|
} |
||||||
|
|
||||||
|
public Task InvokeAsync(Action callback, System.Windows.Threading.DispatcherPriority priority) |
||||||
|
{ |
||||||
|
throw new NotImplementedException(); |
||||||
|
} |
||||||
|
|
||||||
|
public Task InvokeAsync(Action callback, System.Windows.Threading.DispatcherPriority priority, CancellationToken cancellationToken) |
||||||
|
{ |
||||||
|
throw new NotImplementedException(); |
||||||
|
} |
||||||
|
|
||||||
|
public Task<T> InvokeAsync<T>(Func<T> callback) |
||||||
|
{ |
||||||
|
throw new NotImplementedException(); |
||||||
|
} |
||||||
|
|
||||||
|
public Task<T> InvokeAsync<T>(Func<T> callback, System.Windows.Threading.DispatcherPriority priority) |
||||||
|
{ |
||||||
|
throw new NotImplementedException(); |
||||||
|
} |
||||||
|
|
||||||
|
public Task<T> InvokeAsync<T>(Func<T> callback, System.Windows.Threading.DispatcherPriority priority, CancellationToken cancellationToken) |
||||||
|
{ |
||||||
|
throw new NotImplementedException(); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
@ -1,84 +0,0 @@ |
|||||||
#warning
|
|
||||||
//// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
|
|
||||||
//// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
|
||||||
//
|
|
||||||
//using System;
|
|
||||||
//using ICSharpCode.SharpDevelop.Dom;
|
|
||||||
//
|
|
||||||
//namespace ICSharpCode.SharpDevelop.Tests.Utils
|
|
||||||
//{
|
|
||||||
// /// <summary>
|
|
||||||
// /// Mock Ambience class.
|
|
||||||
// /// </summary>
|
|
||||||
// public class MockAmbience : AbstractAmbience
|
|
||||||
// {
|
|
||||||
// public MockAmbience()
|
|
||||||
// {
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public override string Convert(IClass c)
|
|
||||||
// {
|
|
||||||
// return String.Empty;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public override string ConvertEnd(IClass c)
|
|
||||||
// {
|
|
||||||
// return String.Empty;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public override string Convert(IField c)
|
|
||||||
// {
|
|
||||||
// return String.Empty;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public override string Convert(IProperty property)
|
|
||||||
// {
|
|
||||||
// return property.Name;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public override string Convert(IEvent e)
|
|
||||||
// {
|
|
||||||
// return String.Empty;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public override string Convert(IMethod m)
|
|
||||||
// {
|
|
||||||
// return m.Name;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public override string ConvertEnd(IMethod m)
|
|
||||||
// {
|
|
||||||
// return String.Empty;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public override string Convert(IParameter param)
|
|
||||||
// {
|
|
||||||
// return String.Empty;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public override string Convert(IReturnType returnType)
|
|
||||||
// {
|
|
||||||
// return String.Empty;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public override string WrapAttribute(string attribute)
|
|
||||||
// {
|
|
||||||
// return String.Empty;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public override string WrapComment(string comment)
|
|
||||||
// {
|
|
||||||
// return String.Empty;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public override string GetIntrinsicTypeName(string dotNetTypeName)
|
|
||||||
// {
|
|
||||||
// return String.Empty;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public override string ConvertAccessibility(ModifierEnum accessibility)
|
|
||||||
// {
|
|
||||||
// return String.Empty;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//}
|
|
@ -1,367 +0,0 @@ |
|||||||
#warning
|
|
||||||
//// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
|
|
||||||
//// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
|
||||||
//
|
|
||||||
//using ICSharpCode.SharpDevelop.Dom;
|
|
||||||
//using System;
|
|
||||||
//using System.Collections.Generic;
|
|
||||||
//
|
|
||||||
//namespace ICSharpCode.SharpDevelop.Tests.Utils
|
|
||||||
//{
|
|
||||||
// /// <summary>
|
|
||||||
// /// Dummy class that implements the IClass interface. The
|
|
||||||
// /// only properties this mock class implements is DefaultReturnType and FullyQualifiedName.
|
|
||||||
// /// </summary>
|
|
||||||
// public class MockClass : IClass
|
|
||||||
// {
|
|
||||||
// public MockClass(string qualifiedName)
|
|
||||||
// {
|
|
||||||
// this.FullyQualifiedName = qualifiedName;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public string FullyQualifiedName { get; set; }
|
|
||||||
// public IReturnType DefaultReturnType { get; set;}
|
|
||||||
//
|
|
||||||
// public string DotNetName {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public string Name {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public string Namespace {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public ClassType ClassType {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public IProjectContent ProjectContent {
|
|
||||||
// get {
|
|
||||||
// return DefaultProjectContent.DummyProjectContent;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public ISyntaxTree SyntaxTree {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public IUsingScope UsingScope {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public DomRegion Region {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public DomRegion BodyRegion {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public IList<IReturnType> BaseTypes {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public IList<IClass> InnerClasses {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public IList<IField> Fields {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public IList<IProperty> Properties {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public IList<IMethod> Methods {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public IList<IEvent> Events {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public IList<ITypeParameter> TypeParameters {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public IEnumerable<IClass> ClassInheritanceTree {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public IEnumerable<IClass> ClassInheritanceTreeClassesOnly {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public IClass BaseClass {
|
|
||||||
// get {
|
|
||||||
// return BaseType.GetUnderlyingClass();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public IReturnType BaseType { get; set; }
|
|
||||||
//
|
|
||||||
// public bool HasPublicOrInternalStaticMembers {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public bool HasExtensionMethods {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public bool IsPartial {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// set {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public IClass DeclaringType {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public ModifierEnum Modifiers {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public IList<IAttribute> Attributes {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public string Documentation {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public bool IsAbstract {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public bool IsSealed {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public bool IsStatic {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public bool IsConst {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public bool IsVirtual {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public bool IsPublic {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public bool IsProtected {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public bool IsPrivate {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public bool IsInternal {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public bool IsReadonly {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public bool IsProtectedAndInternal {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public bool IsProtectedOrInternal {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public bool IsOverride {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public bool IsOverridable {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public bool IsNew {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public bool IsSynthetic {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public object UserData {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// set {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public bool IsFrozen {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public IReturnType GetBaseType(int index)
|
|
||||||
// {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public IClass GetCompoundClass()
|
|
||||||
// {
|
|
||||||
// return this;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public IClass GetInnermostClass(int caretLine, int caretColumn)
|
|
||||||
// {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public List<IClass> GetAccessibleTypes(IClass callingClass)
|
|
||||||
// {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public IMember SearchMember(string memberName, LanguageProperties language)
|
|
||||||
// {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public bool IsTypeInInheritanceTree(IClass possibleBaseClass)
|
|
||||||
// {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public bool IsAccessible(IClass callingClass, bool isClassInInheritanceTree)
|
|
||||||
// {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public void Freeze()
|
|
||||||
// {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public int CompareTo(object obj)
|
|
||||||
// {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public bool HasCompoundClass {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// set {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public IEnumerable<IMember> AllMembers {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public EntityType EntityType {
|
|
||||||
// get { return EntityType.Class; }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public bool AddDefaultConstructorIfRequired {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//}
|
|
@ -1,160 +0,0 @@ |
|||||||
#warning
|
|
||||||
//// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
|
|
||||||
//// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
|
||||||
//
|
|
||||||
//using ICSharpCode.SharpDevelop.Dom;
|
|
||||||
//using System;
|
|
||||||
//using System.Collections.Generic;
|
|
||||||
//
|
|
||||||
//namespace ICSharpCode.SharpDevelop.Tests.Utils
|
|
||||||
//{
|
|
||||||
// public class MockDefaultReturnType : IReturnType
|
|
||||||
// {
|
|
||||||
// List<IMethod> methods = new List<IMethod>();
|
|
||||||
// List<IProperty> properties = new List<IProperty>();
|
|
||||||
//
|
|
||||||
// public MockDefaultReturnType()
|
|
||||||
// {
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// /// <summary>
|
|
||||||
// /// Gets the method list directly. Only available in the
|
|
||||||
// /// mock default return type class.
|
|
||||||
// /// </summary>
|
|
||||||
// public List<IMethod> Methods {
|
|
||||||
// get {
|
|
||||||
// return methods;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// /// <summary>
|
|
||||||
// /// Gets the property list directly. Only available in the
|
|
||||||
// /// mock default return type class.
|
|
||||||
// /// </summary>
|
|
||||||
// public List<IProperty> Properties {
|
|
||||||
// get {
|
|
||||||
// return properties;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public bool Equals(IReturnType other)
|
|
||||||
// {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public string FullyQualifiedName {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public string Name {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public string Namespace {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public string DotNetName {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public int TypeArgumentCount {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public bool IsDefaultReturnType {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public IClass GetUnderlyingClass()
|
|
||||||
// {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public List<IMethod> GetMethods()
|
|
||||||
// {
|
|
||||||
// return methods;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public List<IProperty> GetProperties()
|
|
||||||
// {
|
|
||||||
// return properties;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public List<IField> GetFields()
|
|
||||||
// {
|
|
||||||
// return new List<IField>();
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public List<IEvent> GetEvents()
|
|
||||||
// {
|
|
||||||
// return new List<IEvent>();
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public ArrayReturnType CastToArrayReturnType()
|
|
||||||
// {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public GenericReturnType CastToGenericReturnType()
|
|
||||||
// {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public ConstructedReturnType CastToConstructedReturnType()
|
|
||||||
// {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public bool IsArrayReturnType {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public bool IsGenericReturnType {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public bool IsConstructedReturnType {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public bool IsDecoratingReturnType<T>() where T : DecoratingReturnType
|
|
||||||
// {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public T CastToDecoratingReturnType<T>() where T : DecoratingReturnType
|
|
||||||
// {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public Nullable<bool> IsReferenceType {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public IReturnType GetDirectReturnType()
|
|
||||||
// {
|
|
||||||
// return this;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//}
|
|
@ -1,34 +0,0 @@ |
|||||||
#warning
|
|
||||||
//// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
|
|
||||||
//// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
|
||||||
//
|
|
||||||
//using System;
|
|
||||||
//using ICSharpCode.SharpDevelop.Dom;
|
|
||||||
//
|
|
||||||
//namespace ICSharpCode.SharpDevelop.Tests.Utils
|
|
||||||
//{
|
|
||||||
// public class MockEntity : AbstractEntity
|
|
||||||
// {
|
|
||||||
// public MockEntity() : base(null)
|
|
||||||
// {
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public override string DocumentationTag {
|
|
||||||
// get {
|
|
||||||
// return String.Empty;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public override ISyntaxTree SyntaxTree {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public override EntityType EntityType {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//}
|
|
@ -1,279 +0,0 @@ |
|||||||
#warning
|
|
||||||
//// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
|
|
||||||
//// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
|
||||||
//
|
|
||||||
//using System;
|
|
||||||
//using System.Collections.Generic;
|
|
||||||
//using ICSharpCode.SharpDevelop.Dom;
|
|
||||||
//
|
|
||||||
//namespace ICSharpCode.SharpDevelop.Tests.Utils
|
|
||||||
//{
|
|
||||||
// public class MockMethod : IMethod
|
|
||||||
// {
|
|
||||||
// string name = String.Empty;
|
|
||||||
//
|
|
||||||
// public MockMethod(string name)
|
|
||||||
// {
|
|
||||||
// this.name = name;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public string Name {
|
|
||||||
// get {
|
|
||||||
// return name;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public IClass DeclaringType { get; set; }
|
|
||||||
// public bool IsConst { get; set; }
|
|
||||||
// public bool IsPrivate { get; set; }
|
|
||||||
// public bool IsOverridable { get; set; }
|
|
||||||
//
|
|
||||||
// public IList<ITypeParameter> TypeParameters {
|
|
||||||
// get {
|
|
||||||
// return new ITypeParameter[0];
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public bool IsConstructor {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public bool IsOperator {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public IList<string> HandlesClauses {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public IList<IParameter> Parameters {
|
|
||||||
// get {
|
|
||||||
// return new IParameter[0];
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public bool IsExtensionMethod {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public string FullyQualifiedName {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public IReturnType DeclaringTypeReference {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// set {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public DomRegion Region {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public string Namespace {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public string DotNetName {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public IReturnType ReturnType {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// set {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public DomRegion BodyRegion {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public IList<ExplicitInterfaceImplementation> InterfaceImplementations {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public ModifierEnum Modifiers {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public IList<IAttribute> Attributes {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public string Documentation {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public bool IsAbstract {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public bool IsSealed {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public bool IsStatic {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public bool IsVirtual {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public bool IsPublic {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public bool IsProtected {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public bool IsInternal {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public bool IsReadonly {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public bool IsProtectedAndInternal {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public bool IsProtectedOrInternal {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public bool IsOverride {
|
|
||||||
// get {
|
|
||||||
// return false;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public bool IsFrozen {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public void Freeze()
|
|
||||||
// {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public IMember GenericMember {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public bool IsNew {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public bool IsSynthetic {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public object UserData {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// set {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public IMember CreateSpecializedMember()
|
|
||||||
// {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public bool IsAccessible(IClass callingClass, bool isClassInInheritanceTree)
|
|
||||||
// {
|
|
||||||
// return !IsPrivate;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public int CompareTo(object obj)
|
|
||||||
// {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public object Clone()
|
|
||||||
// {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public ISyntaxTree SyntaxTree {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public IProjectContent ProjectContent {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public EntityType EntityType {
|
|
||||||
// get { return EntityType.Method; }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//}
|
|
@ -1,26 +0,0 @@ |
|||||||
#warning
|
|
||||||
//// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
|
|
||||||
//// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
|
||||||
//
|
|
||||||
//using System;
|
|
||||||
//using ICSharpCode.SharpDevelop.Dom;
|
|
||||||
//using ICSharpCode.SharpDevelop.Dom.CSharp;
|
|
||||||
//using ICSharpCode.SharpDevelop.Project;
|
|
||||||
//
|
|
||||||
//namespace ICSharpCode.SharpDevelop.Tests.Utils
|
|
||||||
//{
|
|
||||||
// /// <summary>
|
|
||||||
// /// Mocks IProject class that returns a dummy ambience.
|
|
||||||
// /// </summary>
|
|
||||||
// public class MockProject : AbstractProject
|
|
||||||
// {
|
|
||||||
// public MockProject()
|
|
||||||
// {
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public override IAmbience GetAmbience()
|
|
||||||
// {
|
|
||||||
// return null;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//}
|
|
@ -1,297 +0,0 @@ |
|||||||
#warning
|
|
||||||
//// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
|
|
||||||
//// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
|
||||||
//
|
|
||||||
//using System;
|
|
||||||
//using System.Collections.Generic;
|
|
||||||
//using ICSharpCode.SharpDevelop.Dom;
|
|
||||||
//
|
|
||||||
//namespace ICSharpCode.SharpDevelop.Tests.Utils
|
|
||||||
//{
|
|
||||||
// public class MockProperty : IProperty
|
|
||||||
// {
|
|
||||||
// string name = String.Empty;
|
|
||||||
//
|
|
||||||
// public MockProperty(string name)
|
|
||||||
// {
|
|
||||||
// this.name = name;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public string Name {
|
|
||||||
// get {
|
|
||||||
// return name;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public IClass DeclaringType { get; set; }
|
|
||||||
// public bool IsConst { get; set; }
|
|
||||||
// public bool IsPrivate { get; set;}
|
|
||||||
// public bool IsOverridable { get; set;}
|
|
||||||
//
|
|
||||||
// public DomRegion GetterRegion {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public DomRegion SetterRegion {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public bool CanGet {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public bool CanSet {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public bool IsIndexer {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public ModifierEnum GetterModifiers {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public ModifierEnum SetterModifiers {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public IList<IParameter> Parameters {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public bool IsExtensionMethod {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public string FullyQualifiedName {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public IReturnType DeclaringTypeReference {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// set {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public IMember GenericMember {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public DomRegion Region {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public string Namespace {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public string DotNetName {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public IReturnType ReturnType {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// set {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public DomRegion BodyRegion {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public IList<ExplicitInterfaceImplementation> InterfaceImplementations {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public ModifierEnum Modifiers {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public IList<IAttribute> Attributes {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public string Documentation {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public bool IsAbstract {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public bool IsSealed {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public bool IsStatic {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public bool IsVirtual {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public bool IsPublic {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public bool IsProtected {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public bool IsInternal {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public bool IsReadonly {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public bool IsProtectedAndInternal {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public bool IsProtectedOrInternal {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public bool IsOverride {
|
|
||||||
// get {
|
|
||||||
// return false;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public bool IsNew {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public bool IsSynthetic {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public object UserData {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// set {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public bool IsFrozen {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public IMember CreateSpecializedMember()
|
|
||||||
// {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public bool IsAccessible(IClass callingClass, bool isClassInInheritanceTree)
|
|
||||||
// {
|
|
||||||
// return !IsPrivate;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public void Freeze()
|
|
||||||
// {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public int CompareTo(object obj)
|
|
||||||
// {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public object Clone()
|
|
||||||
// {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public ISyntaxTree SyntaxTree {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public IProjectContent ProjectContent {
|
|
||||||
// get {
|
|
||||||
// throw new NotImplementedException();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public EntityType EntityType {
|
|
||||||
// get { return EntityType.Property; }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//}
|
|
Loading…
Reference in new issue