From 1b578dd8cac974261f6394586b7199f973890ab9 Mon Sep 17 00:00:00 2001 From: Matt Ward Date: Sun, 26 Jan 2014 12:01:37 +0000 Subject: [PATCH] Remove Gallio sample. --- .../Gallio.Extension/Gallio.Extension.csproj | 64 ------- .../GallioTestStepConverter.cs | 78 -------- .../Gallio.Extension/ITestResultsWriter.cs | 16 -- .../ITestResultsWriterFactory.cs | 16 -- .../MultiLineTestResultText.cs | 54 ------ .../Properties/AssemblyInfo.cs | 31 ---- .../SharpDevelopTagFormatter.cs | 68 ------- .../SharpDevelopTestRunnerExtension.cs | 51 ----- samples/Gallio/Gallio.Extension/TestResult.cs | 80 -------- .../Gallio.Extension/TestResultsWriter.cs | 90 --------- .../TestResultsWriterFactory.cs | 19 -- .../Gallio.SharpDevelop.Tests.csproj | 96 ---------- ...allioEchoApplicationFileNameTestFixture.cs | 62 ------- .../GallioEchoCommandLineTests.cs | 76 -------- ...oEchoConsoleProcessStartInfoTestFixture.cs | 85 --------- .../GallioTestFailureTestFixture.cs | 85 --------- .../GallioTestFrameworkIsTestClassTests.cs | 91 --------- .../GallioTestFrameworkIsTestMemberTests.cs | 127 ------------- .../GallioTestFrameworkIsTestProjectTests.cs | 97 ---------- ...ToSharpDevelopTestResultConversionTests.cs | 155 ---------------- .../TestResultsWriterTestFixture.cs | 126 ------------- .../TestRunnerExtensionTestFixture.cs | 71 ------- .../Utils/GallioBodyTagFactory.cs | 93 ---------- .../GallioTestStepFinishedEventArgsFactory.cs | 52 ------ .../Utils/MockTestResultsWriter.cs | 52 ------ .../Utils/MockTestResultsWriterFactory.cs | 28 --- .../Utils/MockTestRunnerEvents.cs | 76 -------- ...reateAssertionFailureBodyTagTestFixture.cs | 175 ------------------ .../MockTestResultsWriterFactoryTests.cs | 82 -------- .../Tests/MockTestRunnerEventsTestFixture.cs | 69 ------- samples/Gallio/Gallio.SharpDevelop.sln | 30 --- .../Gallio.SharpDevelop.addin | 28 --- .../Gallio.SharpDevelop.csproj | 86 --------- .../GallioEchoConsoleApplication.cs | 96 ---------- .../GallioEchoConsoleApplicationFactory.cs | 41 ---- ...oEchoConsoleApplicationProcessStartInfo.cs | 32 ---- .../Gallio.SharpDevelop/GallioTestDebugger.cs | 33 ---- .../GallioTestFramework.cs | 128 ------------- .../Gallio.SharpDevelop/GallioTestResult.cs | 54 ------ .../Gallio.SharpDevelop/GallioTestRunner.cs | 32 ---- .../MbUnitTestAttributeName.cs | 47 ----- .../Properties/AssemblyInfo.cs | 31 ---- ...pTestRunnerExtensionCommandLineArgument.cs | 38 ---- .../TestRunnerExtensionCommandLineArgument.cs | 51 ----- samples/Gallio/readme.rtf | Bin 771 -> 0 bytes src/Automated.proj | 3 - 46 files changed, 2995 deletions(-) delete mode 100644 samples/Gallio/Gallio.Extension/Gallio.Extension.csproj delete mode 100644 samples/Gallio/Gallio.Extension/GallioTestStepConverter.cs delete mode 100644 samples/Gallio/Gallio.Extension/ITestResultsWriter.cs delete mode 100644 samples/Gallio/Gallio.Extension/ITestResultsWriterFactory.cs delete mode 100644 samples/Gallio/Gallio.Extension/MultiLineTestResultText.cs delete mode 100644 samples/Gallio/Gallio.Extension/Properties/AssemblyInfo.cs delete mode 100644 samples/Gallio/Gallio.Extension/SharpDevelopTagFormatter.cs delete mode 100644 samples/Gallio/Gallio.Extension/SharpDevelopTestRunnerExtension.cs delete mode 100644 samples/Gallio/Gallio.Extension/TestResult.cs delete mode 100644 samples/Gallio/Gallio.Extension/TestResultsWriter.cs delete mode 100644 samples/Gallio/Gallio.Extension/TestResultsWriterFactory.cs delete mode 100644 samples/Gallio/Gallio.SharpDevelop.Tests/Gallio.SharpDevelop.Tests.csproj delete mode 100644 samples/Gallio/Gallio.SharpDevelop.Tests/GallioEchoApplicationFileNameTestFixture.cs delete mode 100644 samples/Gallio/Gallio.SharpDevelop.Tests/GallioEchoCommandLineTests.cs delete mode 100644 samples/Gallio/Gallio.SharpDevelop.Tests/GallioEchoConsoleProcessStartInfoTestFixture.cs delete mode 100644 samples/Gallio/Gallio.SharpDevelop.Tests/GallioTestFailureTestFixture.cs delete mode 100644 samples/Gallio/Gallio.SharpDevelop.Tests/GallioTestFrameworkIsTestClassTests.cs delete mode 100644 samples/Gallio/Gallio.SharpDevelop.Tests/GallioTestFrameworkIsTestMemberTests.cs delete mode 100644 samples/Gallio/Gallio.SharpDevelop.Tests/GallioTestFrameworkIsTestProjectTests.cs delete mode 100644 samples/Gallio/Gallio.SharpDevelop.Tests/GallioTestToSharpDevelopTestResultConversionTests.cs delete mode 100644 samples/Gallio/Gallio.SharpDevelop.Tests/TestResultsWriterTestFixture.cs delete mode 100644 samples/Gallio/Gallio.SharpDevelop.Tests/TestRunnerExtensionTestFixture.cs delete mode 100644 samples/Gallio/Gallio.SharpDevelop.Tests/Utils/GallioBodyTagFactory.cs delete mode 100644 samples/Gallio/Gallio.SharpDevelop.Tests/Utils/GallioTestStepFinishedEventArgsFactory.cs delete mode 100644 samples/Gallio/Gallio.SharpDevelop.Tests/Utils/MockTestResultsWriter.cs delete mode 100644 samples/Gallio/Gallio.SharpDevelop.Tests/Utils/MockTestResultsWriterFactory.cs delete mode 100644 samples/Gallio/Gallio.SharpDevelop.Tests/Utils/MockTestRunnerEvents.cs delete mode 100644 samples/Gallio/Gallio.SharpDevelop.Tests/Utils/Tests/CreateAssertionFailureBodyTagTestFixture.cs delete mode 100644 samples/Gallio/Gallio.SharpDevelop.Tests/Utils/Tests/MockTestResultsWriterFactoryTests.cs delete mode 100644 samples/Gallio/Gallio.SharpDevelop.Tests/Utils/Tests/MockTestRunnerEventsTestFixture.cs delete mode 100644 samples/Gallio/Gallio.SharpDevelop.sln delete mode 100644 samples/Gallio/Gallio.SharpDevelop/Gallio.SharpDevelop.addin delete mode 100644 samples/Gallio/Gallio.SharpDevelop/Gallio.SharpDevelop.csproj delete mode 100644 samples/Gallio/Gallio.SharpDevelop/GallioEchoConsoleApplication.cs delete mode 100644 samples/Gallio/Gallio.SharpDevelop/GallioEchoConsoleApplicationFactory.cs delete mode 100644 samples/Gallio/Gallio.SharpDevelop/GallioEchoConsoleApplicationProcessStartInfo.cs delete mode 100644 samples/Gallio/Gallio.SharpDevelop/GallioTestDebugger.cs delete mode 100644 samples/Gallio/Gallio.SharpDevelop/GallioTestFramework.cs delete mode 100644 samples/Gallio/Gallio.SharpDevelop/GallioTestResult.cs delete mode 100644 samples/Gallio/Gallio.SharpDevelop/GallioTestRunner.cs delete mode 100644 samples/Gallio/Gallio.SharpDevelop/MbUnitTestAttributeName.cs delete mode 100644 samples/Gallio/Gallio.SharpDevelop/Properties/AssemblyInfo.cs delete mode 100644 samples/Gallio/Gallio.SharpDevelop/SharpDevelopTestRunnerExtensionCommandLineArgument.cs delete mode 100644 samples/Gallio/Gallio.SharpDevelop/TestRunnerExtensionCommandLineArgument.cs delete mode 100644 samples/Gallio/readme.rtf diff --git a/samples/Gallio/Gallio.Extension/Gallio.Extension.csproj b/samples/Gallio/Gallio.Extension/Gallio.Extension.csproj deleted file mode 100644 index 14ebe5ae16..0000000000 --- a/samples/Gallio/Gallio.Extension/Gallio.Extension.csproj +++ /dev/null @@ -1,64 +0,0 @@ - - - - {98030C86-7B0F-4813-AC4D-9FFCF00CF81F} - Debug - x86 - Library - Gallio.Extension - Gallio.Extension - v3.5 - Properties - False - False - 4 - False - False - obj\$(Configuration)\ - - - AnyCPU - False - Auto - 4194304 - 4096 - False - - - bin\Debug\ - true - Full - False - True - DEBUG;TRACE - obj\ - - - bin\Release\ - False - None - True - False - TRACE - - - - ..\Gallio\bin\Gallio.dll - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/samples/Gallio/Gallio.Extension/GallioTestStepConverter.cs b/samples/Gallio/Gallio.Extension/GallioTestStepConverter.cs deleted file mode 100644 index f15fec7329..0000000000 --- a/samples/Gallio/Gallio.Extension/GallioTestStepConverter.cs +++ /dev/null @@ -1,78 +0,0 @@ -// -// -// -// -// $Revision$ -// - -using System; -using System.Diagnostics; -using Model = Gallio.Model; -using Gallio.Common.Markup; -using Gallio.Runner.Events; - -namespace Gallio.Extension -{ - public class GallioTestStepConverter - { - TestStepEventArgs eventArgs; - TestResult testResult; - SharpDevelopTagFormatter tagFormatter; - - public GallioTestStepConverter(TestStepEventArgs eventArgs) - { - this.eventArgs = eventArgs; - Convert(); - } - - void Convert() - { - CreateTestResult(); - ConvertTestOutcome(); - ConvertTestMessages(); - } - - void CreateTestResult() - { - string name = GetTestName(); - testResult = new TestResult(name); - } - - string GetTestName() - { - return eventArgs.Test.FullName.Replace('/', '.'); - } - - void ConvertTestOutcome() - { - testResult.ResultType = GetTestResultType(eventArgs.TestStepRun.Result.Outcome.Status); - } - - TestResultType GetTestResultType(Model.TestStatus status) - { - switch (status) { - case Model.TestStatus.Passed: - return TestResultType.Success; - case Model.TestStatus.Skipped: - case Model.TestStatus.Inconclusive: - return TestResultType.Ignored; - case Model.TestStatus.Failed: - return TestResultType.Failure; - } - return TestResultType.None; - } - - void ConvertTestMessages() - { - tagFormatter = new SharpDevelopTagFormatter(); - tagFormatter.Visit(eventArgs.TestStepRun); - testResult.Message = tagFormatter.TestResultMessage; - testResult.StackTrace = tagFormatter.GetStackTrace(); - } - - public TestResult GetTestResult() - { - return testResult; - } - } -} diff --git a/samples/Gallio/Gallio.Extension/ITestResultsWriter.cs b/samples/Gallio/Gallio.Extension/ITestResultsWriter.cs deleted file mode 100644 index 1ed6c328ba..0000000000 --- a/samples/Gallio/Gallio.Extension/ITestResultsWriter.cs +++ /dev/null @@ -1,16 +0,0 @@ -// -// -// -// -// $Revision$ -// - -using System; - -namespace Gallio.Extension -{ - public interface ITestResultsWriter : IDisposable - { - void Write(TestResult testResult); - } -} diff --git a/samples/Gallio/Gallio.Extension/ITestResultsWriterFactory.cs b/samples/Gallio/Gallio.Extension/ITestResultsWriterFactory.cs deleted file mode 100644 index b72bbee632..0000000000 --- a/samples/Gallio/Gallio.Extension/ITestResultsWriterFactory.cs +++ /dev/null @@ -1,16 +0,0 @@ -// -// -// -// -// $Revision$ -// - -using System; - -namespace Gallio.Extension -{ - public interface ITestResultsWriterFactory - { - ITestResultsWriter Create(string fileName); - } -} diff --git a/samples/Gallio/Gallio.Extension/MultiLineTestResultText.cs b/samples/Gallio/Gallio.Extension/MultiLineTestResultText.cs deleted file mode 100644 index aec199e35b..0000000000 --- a/samples/Gallio/Gallio.Extension/MultiLineTestResultText.cs +++ /dev/null @@ -1,54 +0,0 @@ -// -// -// -// -// $Revision$ -// - -using System; -using System.Text; - -namespace Gallio.Extension -{ - public class MultiLineTestResultText - { - StringBuilder textBuilder = new StringBuilder(); - - public MultiLineTestResultText(string text) - { - EncodeText(text); - } - - public override string ToString() - { - return textBuilder.ToString(); - } - - /// - /// Replaces the first character on each new line with a space. - /// The first line does not have the extra space added. - /// - void EncodeText(string text) - { - if (String.IsNullOrEmpty(text)) { - return; - } - - text = text.TrimEnd(Environment.NewLine.ToCharArray()); - - foreach (char ch in text) { - switch (ch) { - case '\n': - textBuilder.Append("\r\n "); - break; - case '\r': - // Ignore. - break; - default: - textBuilder.Append(ch); - break; - } - } - } - } -} diff --git a/samples/Gallio/Gallio.Extension/Properties/AssemblyInfo.cs b/samples/Gallio/Gallio.Extension/Properties/AssemblyInfo.cs deleted file mode 100644 index d35a1df3c7..0000000000 --- a/samples/Gallio/Gallio.Extension/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,31 +0,0 @@ -#region Using directives - -using System; -using System.Reflection; -using System.Runtime.InteropServices; - -#endregion - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Gallio.Extension")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("Gallio.Extension")] -[assembly: AssemblyCopyright("Copyright 2010")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// This sets the default COM visibility of types in the assembly to invisible. -// If you need to expose a type to COM, use [ComVisible(true)] on that type. -[assembly: ComVisible(false)] - -// The assembly version has following format : -// -// Major.Minor.Build.Revision -// -// You can specify all the values or you can use the default the Revision and -// Build Numbers by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.*")] diff --git a/samples/Gallio/Gallio.Extension/SharpDevelopTagFormatter.cs b/samples/Gallio/Gallio.Extension/SharpDevelopTagFormatter.cs deleted file mode 100644 index edc68a3bd8..0000000000 --- a/samples/Gallio/Gallio.Extension/SharpDevelopTagFormatter.cs +++ /dev/null @@ -1,68 +0,0 @@ -// -// -// -// -// $Revision$ -// - -using System; -using System.Text; -using Gallio.Common.Markup; -using Gallio.Common.Markup.Tags; -using Gallio.Runner.Reports.Schema; - -namespace Gallio.Extension -{ - public class SharpDevelopTagFormatter : ITagVisitor - { - StringBuilder textBuilder = new StringBuilder(); - string testResultMessage = String.Empty; - - public void Visit(TestStepRun testStepRun) - { - foreach (StructuredStream stream in testStepRun.TestLog.Streams) { - VisitBodyTag(stream.Body); - } - } - - public void VisitBodyTag(BodyTag tag) - { - foreach (Tag childTag in tag.Contents) { - childTag.Accept(this); - } - } - - public void VisitSectionTag(SectionTag tag) - { - textBuilder.Append(tag.Name + " "); - tag.AcceptContents(this); - } - - public void VisitMarkerTag(MarkerTag tag) - { - if (tag.Class == Marker.StackTraceClass) { - testResultMessage = textBuilder.ToString(); - textBuilder = new StringBuilder(); - } - tag.AcceptContents(this); - } - - public void VisitEmbedTag(EmbedTag tag) - { - } - - public void VisitTextTag(TextTag tag) - { - textBuilder.Append(tag.Text); - } - - public string TestResultMessage { - get { return testResultMessage; } - } - - public string GetStackTrace() - { - return textBuilder.ToString(); - } - } -} diff --git a/samples/Gallio/Gallio.Extension/SharpDevelopTestRunnerExtension.cs b/samples/Gallio/Gallio.Extension/SharpDevelopTestRunnerExtension.cs deleted file mode 100644 index 48ee05e4fd..0000000000 --- a/samples/Gallio/Gallio.Extension/SharpDevelopTestRunnerExtension.cs +++ /dev/null @@ -1,51 +0,0 @@ -// -// -// -// -// $Revision$ -// - -using System; -using System.Diagnostics; -using Gallio.Runner.Events; -using Gallio.Runner.Extensions; - -namespace Gallio.Extension -{ - public class SharpDevelopTestRunnerExtension : TestRunnerExtension - { - ITestResultsWriterFactory factory; - ITestResultsWriter writer; - - public SharpDevelopTestRunnerExtension(ITestResultsWriterFactory factory) - { - this.factory = factory; - } - - public SharpDevelopTestRunnerExtension() - : this(new TestResultsWriterFactory()) - { - } - - protected override void Initialize() - { - writer = factory.Create(Parameters); - Events.TestStepFinished += TestStepFinished; - Events.DisposeStarted += DisposeStarted; - } - - void TestStepFinished(object source, TestStepFinishedEventArgs e) - { - if (e.Test.IsTestCase) { - GallioTestStepConverter testStep = new GallioTestStepConverter(e); - TestResult testResult = testStep.GetTestResult(); - writer.Write(testResult); - } - } - - void DisposeStarted(object source, DisposeStartedEventArgs e) - { - writer.Dispose(); - } - } -} \ No newline at end of file diff --git a/samples/Gallio/Gallio.Extension/TestResult.cs b/samples/Gallio/Gallio.Extension/TestResult.cs deleted file mode 100644 index fce1e5f28b..0000000000 --- a/samples/Gallio/Gallio.Extension/TestResult.cs +++ /dev/null @@ -1,80 +0,0 @@ -// -// -// -// -// $Revision$ -// - -using System; - -namespace Gallio.Extension -{ - public enum TestResultType { - /// - /// The test has not been run. - /// - None = 0, - - /// - /// The test passed. - /// - Success = 1, - - /// - /// The test failed. - /// - Failure = 2, - - /// - /// The test was ignored. - /// - Ignored = 3 - } - - /// - /// Holds the information about a single test result. - /// - public class TestResult - { - string name = String.Empty; - string message = String.Empty; - string stackTrace = String.Empty; - TestResultType resultType = TestResultType.None; - - public TestResult(string name) - { - this.name = name; - } - - public string Name { - get { return name; } - } - - public bool IsSuccess { - get { return resultType == TestResultType.Success; } - } - - public bool IsFailure { - get { return resultType == TestResultType.Failure; } - } - - public bool IsIgnored { - get { return resultType == TestResultType.Ignored; } - } - - public TestResultType ResultType { - get { return resultType; } - set { resultType = value; } - } - - public string Message { - get { return message; } - set { message = value; } - } - - public string StackTrace { - get { return stackTrace; } - set { stackTrace = value; } - } - } -} diff --git a/samples/Gallio/Gallio.Extension/TestResultsWriter.cs b/samples/Gallio/Gallio.Extension/TestResultsWriter.cs deleted file mode 100644 index 735d497479..0000000000 --- a/samples/Gallio/Gallio.Extension/TestResultsWriter.cs +++ /dev/null @@ -1,90 +0,0 @@ -// -// -// -// -// $Revision$ -// - -using System; -using System.IO; -using System.Text; - -namespace Gallio.Extension -{ - public class TestResultsWriter : ITestResultsWriter, IDisposable - { - TextWriter writer; - - public TestResultsWriter(string fileName) - : this(new StreamWriter(fileName, false, Encoding.UTF8)) - { - } - - public TestResultsWriter(TextWriter writer) - { - this.writer = writer; - } - - public void Write(TestResult testResult) - { - WriteTestName(testResult.Name); - WriteResult(testResult.ResultType); - - if (testResult.ResultType == TestResultType.Failure) { - WriteTestFailureResult(testResult); - } - } - - void WriteTestName(string name) - { - WriteNameAndValue("Name", name); - } - - void WriteResult(TestResultType resultType) - { - string result = GetResult(resultType); - WriteNameAndValue("Result", result); - } - - void WriteTestFailureResult(TestResult testResult) - { - WriteNameAndMultiLineValue("Message", testResult.Message); - WriteNameAndMultiLineValue("StackTrace", testResult.StackTrace); - } - - void WriteNameAndValue(string name, string value) - { - string nameAndValue = String.Format("{0}: {1}", name, value); - WriteLine(nameAndValue); - } - - string GetResult(TestResultType resultType) - { - switch (resultType) { - case TestResultType.Success: - return "Success"; - case TestResultType.Ignored: - return "Ignored"; - case TestResultType.Failure: - return "Failure"; - } - return String.Empty; - } - - void WriteNameAndMultiLineValue(string name, string value) - { - MultiLineTestResultText multiLineText = new MultiLineTestResultText(value); - WriteNameAndValue(name, multiLineText.ToString()); - } - - void WriteLine(string text) - { - writer.WriteLine(text); - } - - public void Dispose() - { - writer.Dispose(); - } - } -} diff --git a/samples/Gallio/Gallio.Extension/TestResultsWriterFactory.cs b/samples/Gallio/Gallio.Extension/TestResultsWriterFactory.cs deleted file mode 100644 index 3c16b25ffb..0000000000 --- a/samples/Gallio/Gallio.Extension/TestResultsWriterFactory.cs +++ /dev/null @@ -1,19 +0,0 @@ -// -// -// -// -// $Revision$ -// - -using System; - -namespace Gallio.Extension -{ - public class TestResultsWriterFactory : ITestResultsWriterFactory - { - public ITestResultsWriter Create(string fileName) - { - return new TestResultsWriter(fileName); - } - } -} diff --git a/samples/Gallio/Gallio.SharpDevelop.Tests/Gallio.SharpDevelop.Tests.csproj b/samples/Gallio/Gallio.SharpDevelop.Tests/Gallio.SharpDevelop.Tests.csproj deleted file mode 100644 index 051cd3e097..0000000000 --- a/samples/Gallio/Gallio.SharpDevelop.Tests/Gallio.SharpDevelop.Tests.csproj +++ /dev/null @@ -1,96 +0,0 @@ - - - - {3F6C539D-DB38-41B4-A5B3-B9A52AE607CD} - Debug - x86 - Library - Gallio.SharpDevelop.Tests - Gallio.SharpDevelop.Tests - v4.0 - C:\Users\Matt\AppData\Roaming\ICSharpCode/SharpDevelop3.0\Settings.SourceAnalysis - False - False - 4 - false - - - x86 - False - Auto - 4194304 - 4096 - - - bin\Debug\ - true - Full - False - True - DEBUG;TRACE - - - bin\Release\ - False - None - True - False - TRACE - - - - - ..\Gallio\bin\Gallio.dll - - - ..\..\..\bin\ICSharpCode.Core.dll - - - ..\..\..\bin\ICSharpCode.SharpDevelop.dll - - - ..\..\..\bin\ICSharpCode.SharpDevelop.Dom.dll - - - ..\..\..\bin\Tools\NUnit\nunit.framework.dll - - - - - ..\..\..\AddIns\Analysis\UnitTesting\UnitTesting.dll - - - ..\..\..\bin\UnitTests\UnitTesting.Tests.dll - - - - - {98030C86-7B0F-4813-AC4D-9FFCF00CF81F} - Gallio.Extension - - - {88D3DC5E-8A91-4DCE-A785-CC37DE0AA0EC} - Gallio.SharpDevelop - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/samples/Gallio/Gallio.SharpDevelop.Tests/GallioEchoApplicationFileNameTestFixture.cs b/samples/Gallio/Gallio.SharpDevelop.Tests/GallioEchoApplicationFileNameTestFixture.cs deleted file mode 100644 index a979d1eafa..0000000000 --- a/samples/Gallio/Gallio.SharpDevelop.Tests/GallioEchoApplicationFileNameTestFixture.cs +++ /dev/null @@ -1,62 +0,0 @@ -// -// -// -// -// $Revision$ -// - -using System; -using System.Collections.Generic; -using ICSharpCode.UnitTesting; -using Gallio.SharpDevelop; -using NUnit.Framework; -using UnitTesting.Tests.Utils; - -namespace Gallio.SharpDevelop.Tests -{ - [TestFixture] - public class GallioEchoApplicationFileNameTestFixture - { - GallioEchoConsoleApplication app; - string gallioEchoConsoleFileName; - MockAddInTree addinTree; - string addinTreePath; - - [SetUp] - public void Init() - { - MockCSharpProject project = new MockCSharpProject(); - SelectedTests tests = new SelectedTests(project); - - gallioEchoConsoleFileName = @"d:\gallio\bin\Gallio.Echo.exe"; - addinTreePath = GallioEchoConsoleApplicationFactory.AddInTreePath; - - addinTree = new MockAddInTree(); - List items = new List(); - items.Add(gallioEchoConsoleFileName); - - addinTree.AddItems(addinTreePath, items); - - GallioEchoConsoleApplicationFactory factory = new GallioEchoConsoleApplicationFactory(addinTree); - app = factory.Create(tests); - } - - [Test] - public void AddInTreeBuildItemsReturnsGallioEchoConsoleFileName() - { - List items = addinTree.BuildItems(addinTreePath, null); - - List expectedItems = new List(); - expectedItems.Add(gallioEchoConsoleFileName); - - Assert.AreEqual(expectedItems.ToArray(), items.ToArray()); - } - - [Test] - public void ApplicationFileNameIsTakenFromAddInTree() - { - string expectedFileName = gallioEchoConsoleFileName; - Assert.AreEqual(expectedFileName, app.FileName); - } - } -} diff --git a/samples/Gallio/Gallio.SharpDevelop.Tests/GallioEchoCommandLineTests.cs b/samples/Gallio/Gallio.SharpDevelop.Tests/GallioEchoCommandLineTests.cs deleted file mode 100644 index 8c7f50fc9a..0000000000 --- a/samples/Gallio/Gallio.SharpDevelop.Tests/GallioEchoCommandLineTests.cs +++ /dev/null @@ -1,76 +0,0 @@ -// -// -// -// -// $Revision$ -// - -using System; -using ICSharpCode.UnitTesting; -using NUnit.Framework; -using UnitTesting.Tests.Utils; - -namespace Gallio.SharpDevelop.Tests -{ - [TestFixture] - public class GallioEchoCommandLineTests - { - MockCSharpProject project; - SelectedTests selectedTests; - - [SetUp] - public void Init() - { - project = new MockCSharpProject(); - selectedTests = new SelectedTests(project); - } - - [Test] - public void CommandLineIncludesProjectOutputAssembly() - { - GallioEchoConsoleApplication app = new GallioEchoConsoleApplication(selectedTests); - - string expectedArgs = - "/rv:v4.0.30319 " + - "\"c:\\projects\\MyTests\\bin\\Debug\\MyTests.dll\""; - - Assert.AreEqual(expectedArgs, app.GetArguments()); - } - - [Test] - public void SharpDevelopTestRunnerExtensionAddedToCommandLine() - { - SharpDevelopTestRunnerExtensionCommandLineArgument arg = - new SharpDevelopTestRunnerExtensionCommandLineArgument(); - arg.TestResultsFileName = @"c:\temp\tmp66.tmp"; - - GallioEchoConsoleApplication app = new GallioEchoConsoleApplication(selectedTests); - app.TestRunnerExtensions.Add(arg); - - string expectedArgs = - "/rv:v4.0.30319 " + - "/re:\"Gallio.Extension.SharpDevelopTestRunnerExtension,Gallio.Extension.dll;c:\\temp\\tmp66.tmp\" " + - "\"c:\\projects\\MyTests\\bin\\Debug\\MyTests.dll\""; - - Assert.AreEqual(expectedArgs, app.GetArguments()); - } - - [Test] - public void TestRunnerExtensionWithoutParametersAddedToCommandLine() - { - TestRunnerExtensionCommandLineArgument arg = - new TestRunnerExtensionCommandLineArgument("MyNamespace.MyTestExtension,MyTestRunner.dll"); - - GallioEchoConsoleApplication app = new GallioEchoConsoleApplication(selectedTests); - app.TestRunnerExtensions.Add(arg); - - string expectedArgs = - "/rv:v4.0.30319 " + - "/re:\"MyNamespace.MyTestExtension,MyTestRunner.dll\" " + - "\"c:\\projects\\MyTests\\bin\\Debug\\MyTests.dll\""; - - Assert.AreEqual(expectedArgs, app.GetArguments()); - } - - } -} diff --git a/samples/Gallio/Gallio.SharpDevelop.Tests/GallioEchoConsoleProcessStartInfoTestFixture.cs b/samples/Gallio/Gallio.SharpDevelop.Tests/GallioEchoConsoleProcessStartInfoTestFixture.cs deleted file mode 100644 index 6885bafd47..0000000000 --- a/samples/Gallio/Gallio.SharpDevelop.Tests/GallioEchoConsoleProcessStartInfoTestFixture.cs +++ /dev/null @@ -1,85 +0,0 @@ -// -// -// -// -// $Revision$ -// - -using System; -using System.Diagnostics; -using System.IO; -using Gallio.SharpDevelop; -using Gallio.SharpDevelop.Tests.Utils; -using ICSharpCode.Core; -using ICSharpCode.UnitTesting; -using NUnit.Framework; -using UnitTesting.Tests.Utils; - -namespace Gallio.SharpDevelop.Tests -{ - [TestFixture] - public class GallioEchoConsoleProcessStartInfoTestFixture - { - ProcessStartInfo info; - - [TestFixtureSetUp] - public void SetUpFixture() - { - string xml = - "\r\n" + - " \r\n" + - " \r\n" + - " \r\n" + - ""; - AddIn addin = AddIn.Load(new StringReader(xml)); - addin.Enabled = false; - addin.FileName = @"d:\sharpdevelop\addins\gallio\Gallio.SharpDevelop.dll"; - AddInTree.InsertAddIn(addin); - } - - [SetUp] - public void Init() - { - MockCSharpProject project = new MockCSharpProject(); - SelectedTests selectedTests = new SelectedTests(project); - GallioEchoConsoleApplication app = new GallioEchoConsoleApplication(selectedTests, @"d:\gallio\Gallio.Echo.exe"); - info = app.GetProcessStartInfo(); - } - - [Test] - public void GallioAddInPathIsConvertedByStringParser() - { - string expectedDirectory = @"d:\sharpdevelop\addins\gallio"; - string actualDirectory = StringParser.Parse("${addinpath:ICSharpCode.Gallio}"); - Assert.AreEqual(expectedDirectory, actualDirectory); - } - - [Test] - public void WorkingDirectoryIsGallioAddInDirectory() - { - string expectedDirectory = @"d:\sharpdevelop\addins\gallio"; - Assert.AreEqual(expectedDirectory, info.WorkingDirectory); - } - - [Test] - public void FileNameIsNUnitConsoleExe() - { - string expectedFileName = @"d:\gallio\Gallio.Echo.exe"; - Assert.AreEqual(expectedFileName, info.FileName); - } - - [Test] - public void CommandLineArgumentsAreNUnitConsoleExeCommandLineArguments() - { - string expectedCommandLine = - "/rv:v4.0.30319 " + - "\"c:\\projects\\MyTests\\bin\\Debug\\MyTests.dll\""; - - Assert.AreEqual(expectedCommandLine, info.Arguments); - } - } -} diff --git a/samples/Gallio/Gallio.SharpDevelop.Tests/GallioTestFailureTestFixture.cs b/samples/Gallio/Gallio.SharpDevelop.Tests/GallioTestFailureTestFixture.cs deleted file mode 100644 index 17f1959f1c..0000000000 --- a/samples/Gallio/Gallio.SharpDevelop.Tests/GallioTestFailureTestFixture.cs +++ /dev/null @@ -1,85 +0,0 @@ -// -// -// -// -// $Revision$ -// - -using System; -using ICSharpCode.SharpDevelop.Dom; -using ICSharpCode.UnitTesting; -using NUnit.Framework; -using Gallio.SharpDevelop; - -namespace Gallio.SharpDevelop.Tests -{ - [TestFixture] - public class GallioTestFailureTestFixture - { - GallioTestResult gallioTestResult; - - [SetUp] - public void Init() - { - TestResult testResult = new TestResult("MyNamespace.MyTests"); - testResult.ResultType = TestResultType.Failure; - testResult.Message = "Test failed"; - testResult.StackTrace = - @" at GallioTest.MyClass.AssertWithFailureMessage() in d:\temp\test\..\GallioTest\MyClass.cs:line 46"; - gallioTestResult = new GallioTestResult(testResult); - } - - [Test] - public void TestResultTypeIsFailure() - { - Assert.AreEqual(TestResultType.Failure, gallioTestResult.ResultType); - } - - [Test] - public void TestResultMessageIsTestFailed() - { - Assert.AreEqual("Test failed", gallioTestResult.Message); - } - - [Test] - public void TestResultHasStackTrace() - { - string expectedStackTrace = - @" at GallioTest.MyClass.AssertWithFailureMessage() in d:\temp\test\..\GallioTest\MyClass.cs:line 46"; - Assert.AreEqual(expectedStackTrace, gallioTestResult.StackTrace); - } - - [Test] - public void TestResultHasExpectedName() - { - Assert.AreEqual("MyNamespace.MyTests", gallioTestResult.Name); - } - - [Test] - public void StackTraceFilePositionFileNameMatchesLastFileNameInStackTrace() - { - string expectedFileName = @"d:\temp\GallioTest\MyClass.cs"; - Assert.AreEqual(expectedFileName, gallioTestResult.StackTraceFilePosition.FileName); - } - - [Test] - public void StackTraceFilePositionLineNumberIs46WhichIsEqualToReportedErrorLine() - { - Assert.AreEqual(46, gallioTestResult.StackTraceFilePosition.Line); - } - - [Test] - public void StackTraceFilePositionColumnNumberIsOne() - { - Assert.AreEqual(1, gallioTestResult.StackTraceFilePosition.Column); - } - - [Test] - public void ChangingStackTraceToEmptyStringSetsStackTraceFilePositionToEmpty() - { - gallioTestResult.StackTraceFilePosition = new FilePosition("test.cs", 10, 2); - gallioTestResult.StackTrace = String.Empty; - Assert.IsTrue(gallioTestResult.StackTraceFilePosition.IsEmpty); - } - } -} diff --git a/samples/Gallio/Gallio.SharpDevelop.Tests/GallioTestFrameworkIsTestClassTests.cs b/samples/Gallio/Gallio.SharpDevelop.Tests/GallioTestFrameworkIsTestClassTests.cs deleted file mode 100644 index 5ce3a919a6..0000000000 --- a/samples/Gallio/Gallio.SharpDevelop.Tests/GallioTestFrameworkIsTestClassTests.cs +++ /dev/null @@ -1,91 +0,0 @@ -// -// -// -// -// $Revision$ -// - -using System; -using System.Collections.Generic; -using Gallio.SharpDevelop; -using ICSharpCode.SharpDevelop.Dom; -using ICSharpCode.SharpDevelop.Project; -using ICSharpCode.UnitTesting; -using NUnit.Framework; -using UnitTesting.Tests.Utils; - -namespace Gallio.SharpDevelop.Tests -{ - [TestFixture] - public class GallioTestFrameworkIsTestClassTests - { - GallioTestFramework testFramework; - - [SetUp] - public void Init() - { - testFramework = new GallioTestFramework(); - } - - [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 IsTestClassReturnsTrueHasClassHasTestFixtureAttribute() - { - MockAttribute testFixtureAttribute = new MockAttribute("TestFixtureAttribute"); - MockClass mockClass = MockClass.CreateMockClassWithAttribute(testFixtureAttribute); - Assert.IsTrue(testFramework.IsTestClass(mockClass)); - } - - [Test] - public void IsTestClassReturnsTrueHasClassHasFullyQualifiedNUnitTestFixtureAttribute() - { - MockAttribute testFixtureAttribute = new MockAttribute("MbUnit.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)); - } - } -} diff --git a/samples/Gallio/Gallio.SharpDevelop.Tests/GallioTestFrameworkIsTestMemberTests.cs b/samples/Gallio/Gallio.SharpDevelop.Tests/GallioTestFrameworkIsTestMemberTests.cs deleted file mode 100644 index 38869fe395..0000000000 --- a/samples/Gallio/Gallio.SharpDevelop.Tests/GallioTestFrameworkIsTestMemberTests.cs +++ /dev/null @@ -1,127 +0,0 @@ -// -// -// -// -// $Revision$ -// - -using System; -using System.Collections.Generic; -using Gallio.SharpDevelop; -using ICSharpCode.SharpDevelop.Dom; -using ICSharpCode.SharpDevelop.Project; -using ICSharpCode.UnitTesting; -using NUnit.Framework; -using UnitTesting.Tests.Utils; - -namespace Gallio.SharpDevelop.Tests -{ - [TestFixture] - public class GallioTestFrameworkIsTestMemberTests - { - GallioTestFramework testFramework; - - [SetUp] - public void Init() - { - testFramework = new GallioTestFramework(); - } - - [Test] - public void IsTestMemberReturnsFalseWhenMethodHasNoAttributes() - { - MockMethod mockMethod = MockMethod.CreateMockMethodWithoutAnyAttributes(); - Assert.IsFalse(testFramework.IsTestMember(mockMethod)); - } - - [Test] - public void IsTestMemberReturnsTrueWhenMethodHasTestAttributeWithoutAttributePart() - { - MockAttribute testAttribute = new MockAttribute("Test"); - MockMethod mockMethod = MockMethod.CreateMockMethodWithAttribute(testAttribute); - Assert.IsTrue(testFramework.IsTestMember(mockMethod)); - } - - [Test] - public void IsTestMemberReturnsTrueWhenMethodHasTestAttributeAttribute() - { - MockAttribute testAttribute = new MockAttribute("TestAttribute"); - MockMethod mockMethod = MockMethod.CreateMockMethodWithAttribute(testAttribute); - Assert.IsTrue(testFramework.IsTestMember(mockMethod)); - } - - [Test] - public void IsTestMemberReturnsTrueWhenMethodHasFullyQualifiedNUnitTestAttribute() - { - MockAttribute testAttribute = new MockAttribute("MbUnit.Framework.TestAttribute"); - MockMethod mockMethod = MockMethod.CreateMockMethodWithAttribute(testAttribute); - Assert.IsTrue(testFramework.IsTestMember(mockMethod)); - } - - [Test] - public void IsTestMemberReturnsFalseWhenMethodIsNull() - { - Assert.IsFalse(testFramework.IsTestMember(null)); - } - - [Test] - public void IsTestMemberReturnsFalseWhenProjectContentLanguageHasNullNameComparer() - { - IProject project = new MockCSharpProject(); - MockProjectContent mockProjectContent = new MockProjectContent(); - mockProjectContent.Project = project; - mockProjectContent.Language = new LanguageProperties(null); - MockClass mockClass = new MockClass(mockProjectContent); - MockMethod mockMethod = new MockMethod(mockClass); - mockMethod.Attributes.Add(new MockAttribute("Test")); - - Assert.IsFalse(testFramework.IsTestMember(mockMethod)); - } - - /// - /// Even if the project is null the method should be - /// flagged as a TestMethod. - /// - [Test] - public void IsTestMemberReturnsTrueWhenProjectIsNull() - { - MockAttribute testAttribute = new MockAttribute("Test"); - MockMethod mockMethod = MockMethod.CreateMockMethodWithAttribute(testAttribute); - MockProjectContent mockProjectContent = (MockProjectContent)mockMethod.DeclaringType.ProjectContent; - mockProjectContent.Project = null; - - Assert.IsTrue(testFramework.IsTestMember(mockMethod)); - } - - [Test] - public void IsTestMemberReturnsFalseWhenMethodHasNullDeclaringType() - { - MockMethod mockMethod = new MockMethod(new MockClass()); - - Assert.IsFalse(testFramework.IsTestMember(mockMethod)); - } - - [Test] - public void IsTestMemberReturnsFalseWhenMethodHasNullLanguage() - { - IProject project = new MockCSharpProject(); - MockProjectContent mockProjectContent = new MockProjectContent(); - mockProjectContent.Project = project; - MockClass mockClass = new MockClass(mockProjectContent); - MockMethod mockMethod = new MockMethod(mockClass); - - Assert.IsFalse(testFramework.IsTestMember(mockMethod)); - } - - [Test] - public void IsTestMemberReturnsFalseWhenMethodHasHasParameters() - { - MockAttribute testAttribute = new MockAttribute("Test"); - MockMethod mockMethod = MockMethod.CreateMockMethodWithAttribute(testAttribute); - MockParameter mockParameter = new MockParameter(); - mockMethod.Parameters.Add(mockParameter); - - Assert.IsFalse(testFramework.IsTestMember(mockMethod)); - } - } -} diff --git a/samples/Gallio/Gallio.SharpDevelop.Tests/GallioTestFrameworkIsTestProjectTests.cs b/samples/Gallio/Gallio.SharpDevelop.Tests/GallioTestFrameworkIsTestProjectTests.cs deleted file mode 100644 index b6314232ea..0000000000 --- a/samples/Gallio/Gallio.SharpDevelop.Tests/GallioTestFrameworkIsTestProjectTests.cs +++ /dev/null @@ -1,97 +0,0 @@ -// -// -// -// -// $Revision$ -// - -using System; -using Gallio.SharpDevelop; -using ICSharpCode.SharpDevelop.Project; -using ICSharpCode.UnitTesting; -using NUnit.Framework; -using UnitTesting.Tests.Utils; - -namespace Gallio.SharpDevelop.Tests -{ - [TestFixture] - public class GallioTestFrameworkIsTestProjectTests - { - GallioTestFramework testFramework; - - [SetUp] - public void Init() - { - testFramework = new GallioTestFramework(); - } - - [Test] - public void GallioTestFrameworkImplementsITestFramework() - { - Assert.IsNotNull(testFramework as ITestFramework); - } - - [Test] - public void IsTestProjectReturnsFalseForNullProject() - { - Assert.IsFalse(testFramework.IsTestProject(null)); - } - - [Test] - public void IsTestProjectReturnsTrueForProjectWithMbUnitFrameworkAssemblyReference() - { - MockCSharpProject project = new MockCSharpProject(); - - ReferenceProjectItem systemRef = new ReferenceProjectItem(project, "System"); - ProjectService.AddProjectItem(project, systemRef); - - ReferenceProjectItem nunitFrameworkRef = new ReferenceProjectItem(project, "MbUnit"); - ProjectService.AddProjectItem(project, nunitFrameworkRef); - - Assert.IsTrue(testFramework.IsTestProject(project)); - } - - [Test] - public void IsTestProjectReturnsFalseForProjectWithoutMbUnitFrameworkAssemblyReference() - { - MockCSharpProject project = new MockCSharpProject(); - Assert.IsFalse(testFramework.IsTestProject(project)); - } - - [Test] - public void IsTestProjectReturnsTrueForProjectWithMbUnitFrameworkAssemblyReferenceIgnoringCase() - { - MockCSharpProject project = new MockCSharpProject(); - - ReferenceProjectItem nunitFrameworkRef = new ReferenceProjectItem(project, "MBUNIT"); - ProjectService.AddProjectItem(project, nunitFrameworkRef); - - Assert.IsTrue(testFramework.IsTestProject(project)); - } - - [Test] - public void IsTestProjectReturnsTrueForProjectWithMbUnitFrameworkAssemblyReferenceIgnoringNonReferenceProjectItems() - { - MockCSharpProject project = new MockCSharpProject(); - - FileProjectItem fileItem = new FileProjectItem(project, ItemType.Compile, "test.cs"); - ProjectService.AddProjectItem(project, fileItem); - - ReferenceProjectItem nunitFrameworkRef = new ReferenceProjectItem(project, "mbunit"); - ProjectService.AddProjectItem(project, nunitFrameworkRef); - - Assert.IsTrue(testFramework.IsTestProject(project)); - } - - [Test] - public void IsTestProjectReturnsTrueForProjectWithMbUnitFrameworkAssemblyReferenceUsingFullName() - { - MockCSharpProject project = new MockCSharpProject(); - string assemblyName = "mbunit, Version=2.5.3.9345, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77"; - ReferenceProjectItem mbunitFrameworkRef = new ReferenceProjectItem(project, assemblyName); - ProjectService.AddProjectItem(project, mbunitFrameworkRef); - - Assert.IsTrue(testFramework.IsTestProject(project)); - } - } -} diff --git a/samples/Gallio/Gallio.SharpDevelop.Tests/GallioTestToSharpDevelopTestResultConversionTests.cs b/samples/Gallio/Gallio.SharpDevelop.Tests/GallioTestToSharpDevelopTestResultConversionTests.cs deleted file mode 100644 index 6c295880c6..0000000000 --- a/samples/Gallio/Gallio.SharpDevelop.Tests/GallioTestToSharpDevelopTestResultConversionTests.cs +++ /dev/null @@ -1,155 +0,0 @@ -// -// -// -// -// $Revision$ -// - -using System; -using Model = Gallio.Model; -using Gallio.Extension; -using Gallio.Runner.Events; -using Gallio.SharpDevelop; -using Gallio.SharpDevelop.Tests.Utils; -using NUnit.Framework; - -namespace Gallio.SharpDevelop.Tests -{ - [TestFixture] - public class GallioTestToSharpDevelopTestResultConversionTests - { - GallioTestStepFinishedEventArgsFactory factory; - TestStepFinishedEventArgs testStepEventArgs; - GallioTestStepConverter converter; - TestResult testResult; - - [SetUp] - public void Init() - { - factory = new GallioTestStepFinishedEventArgsFactory(); - } - - [Test] - public void GallioTestNameIsConvertedToSharpDevelopTestName() - { - string gallioTestName = "MyNamespace/MyClass/MyTestMethod"; - CreateGallioTestStepEventArgs(gallioTestName); - ConvertToSharpDevelopTestResult(); - - string expectedTestName = "MyNamespace.MyClass.MyTestMethod"; - Assert.AreEqual(expectedTestName, testResult.Name); - } - - void CreateGallioTestStepEventArgs(string testName) - { - testStepEventArgs = factory.Create(testName); - } - - void ConvertToSharpDevelopTestResult() - { - converter = new GallioTestStepConverter(testStepEventArgs); - testResult = converter.GetTestResult(); - } - - [Test] - public void GallioTestOutcomePassedIsConvertedToSharpDevelopTestSuccess() - { - CreateGallioTestStepEventArgs(); - UpdateGallioTestOutcomeToPassed(); - ConvertToSharpDevelopTestResult(); - - Assert.AreEqual(TestResultType.Success, testResult.ResultType); - } - - void CreateGallioTestStepEventArgs() - { - CreateGallioTestStepEventArgs("MyNamespace.MyClass.MyTest"); - } - - void UpdateGallioTestOutcomeToPassed() - { - UpdateGallioTestOutcome(Model.TestOutcome.Passed); - } - - void UpdateGallioTestOutcome(Model.TestOutcome testOutcome) - { - testStepEventArgs.TestStepRun.Result.Outcome = testOutcome; - } - - [Test] - public void GallioTestOutcomeErrorIsConvertedToSharpDevelopTestFailure() - { - CreateGallioTestStepEventArgs(); - UpdateGallioTestOutcomeToError(); - ConvertToSharpDevelopTestResult(); - - Assert.AreEqual(TestResultType.Failure, testResult.ResultType); - } - - void UpdateGallioTestOutcomeToError() - { - UpdateGallioTestOutcome(Model.TestOutcome.Error); - } - - [Test] - public void GallioTestOutcomeSkippedIsConvertedToSharpDevelopTestIgnored() - { - CreateGallioTestStepEventArgs(); - UpdateGallioTestOutcomeToSkipped(); - ConvertToSharpDevelopTestResult(); - - Assert.AreEqual(TestResultType.Ignored, testResult.ResultType); - } - - void UpdateGallioTestOutcomeToSkipped() - { - UpdateGallioTestOutcome(Model.TestOutcome.Skipped); - } - - [Test] - public void GallioTestOutcomeInconclusiveIsConvertedToSharpDevelopTestIgnored() - { - CreateGallioTestStepEventArgs(); - UpdateGallioTestOutcomeToInconclusive(); - ConvertToSharpDevelopTestResult(); - - Assert.AreEqual(TestResultType.Ignored, testResult.ResultType); - } - - void UpdateGallioTestOutcomeToInconclusive() - { - UpdateGallioTestOutcome(Model.TestOutcome.Inconclusive); - } - - [Test] - public void GallioAssertionFailureMessageIsConvertedToSharpDevelopTestResultMessage() - { - CreateGallioTestStepEventArgs(); - UpdateGallioTestOutcomeToError(); - UpdateGallioTestLogWithAssertionFailure(); - ConvertToSharpDevelopTestResult(); - - string expectedMessage = "Expected value to be true. User assertion message."; - Assert.AreEqual(expectedMessage, testResult.Message); - } - - void UpdateGallioTestLogWithAssertionFailure() - { - GallioBodyTagFactory factory = new GallioBodyTagFactory(); - testStepEventArgs.TestStepRun.TestLog.Streams.Add(factory.CreateAssertionFailureStructuredStream()); - } - - [Test] - public void GallioAssertionFailureStackTraceIsConvertedToSharpDevelopTestResultStackTrace() - { - CreateGallioTestStepEventArgs(); - UpdateGallioTestOutcomeToError(); - UpdateGallioTestLogWithAssertionFailure(); - ConvertToSharpDevelopTestResult(); - - string expectedStackTrace = - @" at GallioTest.MyClass.AssertWithFailureMessage() in d:\temp\test\GallioTest\MyClass.cs:line 46 "; - Assert.AreEqual(expectedStackTrace, testResult.StackTrace); - } - } -} diff --git a/samples/Gallio/Gallio.SharpDevelop.Tests/TestResultsWriterTestFixture.cs b/samples/Gallio/Gallio.SharpDevelop.Tests/TestResultsWriterTestFixture.cs deleted file mode 100644 index 505cd93e81..0000000000 --- a/samples/Gallio/Gallio.SharpDevelop.Tests/TestResultsWriterTestFixture.cs +++ /dev/null @@ -1,126 +0,0 @@ -// -// -// -// -// $Revision$ -// - -using System; -using System.IO; -using System.Text; -using Gallio.Extension; -using NUnit.Framework; - -namespace Gallio.SharpDevelop.Tests -{ - [TestFixture] - public class TestResultsWriterTestFixture - { - TestResultsWriter writer; - StringBuilder results; - - [SetUp] - public void Init() - { - results = new StringBuilder(); - StringWriter stringWriter = new StringWriter(results); - writer = new TestResultsWriter(stringWriter); - } - - [TearDown] - public void TearDown() - { - writer.Dispose(); - } - - [Test] - public void WriteSuccessTestResult() - { - TestResult testResult = new TestResult("MyTests.MyTestClass.MyTestMethod"); - testResult.ResultType = TestResultType.Success; - writer.Write(testResult); - - string expectedText = - "Name: MyTests.MyTestClass.MyTestMethod\r\n" + - "Result: Success\r\n"; - - Assert.AreEqual(expectedText, results.ToString()); - } - - [Test] - public void WriteIgnoredTestResult() - { - TestResult testResult = new TestResult("MyTests.MyTestClass.MyTestMethod"); - testResult.ResultType = TestResultType.Ignored; - writer.Write(testResult); - - string expectedText = - "Name: MyTests.MyTestClass.MyTestMethod\r\n" + - "Result: Ignored\r\n"; - - Assert.AreEqual(expectedText, results.ToString()); - } - - [Test] - public void WriteFailedTestResult() - { - TestResult testResult = new TestResult("MyTests.MyTestClass.MyTestMethod"); - testResult.ResultType = TestResultType.Failure; - testResult.Message = "message"; - testResult.StackTrace = "stacktrace"; - writer.Write(testResult); - - string expectedText = - "Name: MyTests.MyTestClass.MyTestMethod\r\n" + - "Result: Failure\r\n" + - "Message: message\r\n" + - "StackTrace: stacktrace\r\n"; - - Assert.AreEqual(expectedText, results.ToString()); - } - - [Test] - public void WriteFailedTestResultWithTwoLineMessage() - { - TestResult testResult = new TestResult("MyTests.MyTestClass.MyTestMethod"); - testResult.ResultType = TestResultType.Failure; - testResult.Message = "first\r\n" + - "second"; - testResult.StackTrace = "stacktrace"; - writer.Write(testResult); - - string expectedText = - "Name: MyTests.MyTestClass.MyTestMethod\r\n" + - "Result: Failure\r\n" + - "Message: first\r\n" + - " second\r\n" + - "StackTrace: stacktrace\r\n"; - - Assert.AreEqual(expectedText, results.ToString()); - } - - [Test] - public void WriteFailedTestResultWithThreeLineStackTrace() - { - TestResult testResult = new TestResult("MyTests.MyTestClass.MyTestMethod"); - testResult.ResultType = TestResultType.Failure; - testResult.Message = "first\r\n" + - "second\r\n"; - testResult.StackTrace = "first\r\n" + - "second\r\n" + - "third\r\n"; - writer.Write(testResult); - - string expectedText = - "Name: MyTests.MyTestClass.MyTestMethod\r\n" + - "Result: Failure\r\n" + - "Message: first\r\n" + - " second\r\n" + - "StackTrace: first\r\n" + - " second\r\n" + - " third\r\n"; - - Assert.AreEqual(expectedText, results.ToString()); - } - } -} diff --git a/samples/Gallio/Gallio.SharpDevelop.Tests/TestRunnerExtensionTestFixture.cs b/samples/Gallio/Gallio.SharpDevelop.Tests/TestRunnerExtensionTestFixture.cs deleted file mode 100644 index 6719b90d35..0000000000 --- a/samples/Gallio/Gallio.SharpDevelop.Tests/TestRunnerExtensionTestFixture.cs +++ /dev/null @@ -1,71 +0,0 @@ -// -// -// -// -// $Revision$ -// - -using System; -using Gallio.Extension; -using Gallio.Runtime.Logging; -using Gallio.SharpDevelop.Tests.Utils; -using ICSharpCode.UnitTesting; -using NUnit.Framework; - -namespace Gallio.SharpDevelop.Tests -{ - [TestFixture] - public class TestRunnerExtensionTestFixture - { - SharpDevelopTestRunnerExtension testRunnerExtension; - MockTestResultsWriterFactory factory; - MockTestRunnerEvents testRunnerEvents; - MockTestResultsWriter writer; - NullLogger logger; - - [SetUp] - public void Init() - { - testRunnerEvents = new MockTestRunnerEvents(); - logger = new NullLogger(); - factory = new MockTestResultsWriterFactory(); - - testRunnerExtension = new SharpDevelopTestRunnerExtension(factory); - testRunnerExtension.Parameters = @"c:\temp\tmp77.tmp"; - testRunnerExtension.Install(testRunnerEvents, logger); - - writer = factory.TestResultsWriter; - } - - [Test] - public void TestResultWriterCreatedWithFileNameTakenFromTestRunnerExtensionParameters() - { - string expectedFileName = @"c:\temp\tmp77.tmp"; - Assert.AreEqual(expectedFileName, writer.FileName); - } - - [Test] - public void FiringTestStepFinishedEventWritesTestResultNameToTestResultsWriter() - { - string testName = "MyNamespace.MyTests.MyTestMethod"; - testRunnerEvents.FireTestStepFinishedEvent("MyNamespace.MyTests.MyTestMethod"); - - Assert.AreEqual(testName, writer.FirstTestResult.Name); - } - - [Test] - public void TestRunnerEventsDisposeStartedEventCausesTestResultsWriterToBeDisposed() - { - testRunnerEvents.FireDisposeStartedEvent(); - Assert.IsTrue(writer.IsDisposed); - } - - [Test] - public void FiringTestStepFinishedEventWithNonTestCaseDoesNotWriteTestResultToTestResultsWriter() - { - testRunnerEvents.FireTestStepFinishedEventForNonTestCase("MyNamespace.MyTests.MyTestMethod"); - - Assert.AreEqual(0, writer.TestResults.Count); - } - } -} diff --git a/samples/Gallio/Gallio.SharpDevelop.Tests/Utils/GallioBodyTagFactory.cs b/samples/Gallio/Gallio.SharpDevelop.Tests/Utils/GallioBodyTagFactory.cs deleted file mode 100644 index bea5cdc90b..0000000000 --- a/samples/Gallio/Gallio.SharpDevelop.Tests/Utils/GallioBodyTagFactory.cs +++ /dev/null @@ -1,93 +0,0 @@ -// -// -// -// -// $Revision$ -// - -using System; -using Gallio.Model; -using Gallio.Common.Markup; -using Gallio.Common.Markup.Tags; -using Gallio.Common.Reflection; - -namespace Gallio.SharpDevelop.Tests.Utils -{ - public class GallioBodyTagFactory - { - public StructuredStream CreateAssertionFailureStructuredStream() - { - StructuredStream stream = new StructuredStream("Failures"); - stream.Body = CreateAssertionFailure(); - return stream; - } - - public BodyTag CreateAssertionFailure() - { - BodyTag bodyTag = new BodyTag(); - bodyTag.Contents.Add(CreateAssertionFailureMarkerTag()); - return bodyTag; - } - - MarkerTag CreateAssertionFailureMarkerTag() - { - MarkerTag markerTag = new MarkerTag(Marker.AssertionFailure); - markerTag.Contents.Add(CreateAssertionFailureSectionTag()); - return markerTag; - } - - SectionTag CreateAssertionFailureSectionTag() - { - SectionTag sectionTag = new SectionTag("Expected value to be true."); - sectionTag.Contents.Add(CreateUserAssertionMessageTextTag()); - sectionTag.Contents.Add(CreateMonospaceMarkerTag()); - sectionTag.Contents.Add(CreateEmptyTextTag()); - sectionTag.Contents.Add(CreateStackTraceMarkerTag()); - return sectionTag; - } - - TextTag CreateUserAssertionMessageTextTag() - { - return new TextTag("User assertion message."); - } - - MarkerTag CreateMonospaceMarkerTag() - { - return new MarkerTag(Marker.Monospace); - } - - TextTag CreateEmptyTextTag() - { - return new TextTag(String.Empty); - } - - MarkerTag CreateStackTraceMarkerTag() - { - MarkerTag markerTag = new MarkerTag(Marker.StackTrace); - markerTag.Contents.Add(CreateStackTraceTextTag()); - markerTag.Contents.Add(CreateCodeLocationMarkerTag()); - return markerTag; - } - - TextTag CreateStackTraceTextTag() - { - string text = " at GallioTest.MyClass.AssertWithFailureMessage() in "; - return new TextTag(text); - } - - MarkerTag CreateCodeLocationMarkerTag() - { - CodeLocation location = new CodeLocation(); - Marker marker = Marker.CodeLocation(location); - MarkerTag markerTag = new MarkerTag(marker); - markerTag.Contents.Add(CreateCodeLocationTextTag()); - return markerTag; - } - - TextTag CreateCodeLocationTextTag() - { - string text = @"d:\temp\test\GallioTest\MyClass.cs:line 46 "; - return new TextTag(text); - } - } -} diff --git a/samples/Gallio/Gallio.SharpDevelop.Tests/Utils/GallioTestStepFinishedEventArgsFactory.cs b/samples/Gallio/Gallio.SharpDevelop.Tests/Utils/GallioTestStepFinishedEventArgsFactory.cs deleted file mode 100644 index 0a3bc5856c..0000000000 --- a/samples/Gallio/Gallio.SharpDevelop.Tests/Utils/GallioTestStepFinishedEventArgsFactory.cs +++ /dev/null @@ -1,52 +0,0 @@ -// -// -// -// -// $Revision$ -// - -using System; -using ICSharpCode.UnitTesting; -using Gallio.Model.Schema; -using Gallio.Runner.Events; -using Gallio.Runner.Reports.Schema; - -namespace Gallio.SharpDevelop.Tests.Utils -{ - public class GallioTestStepFinishedEventArgsFactory - { - TestData gallioTest; - Report gallioReport = new Report(); - TestStepRun gallioTestStepRun; - - public TestStepFinishedEventArgs Create(string name) - { - CreateTestData(name); - CreateTestStepRun(); - return CreateTestStepFinishedEventArgs(); - } - - void CreateTestData(string name) - { - string gallioTestName = ConvertToGallioTestName(name); - gallioTest = new TestData("a", "b", gallioTestName); - gallioTest.IsTestCase = true; - } - - void CreateTestStepRun() - { - TestStepData testStepData = new TestStepData("a", "b", "c", "d"); - gallioTestStepRun = new TestStepRun(testStepData); - } - - string ConvertToGallioTestName(string name) - { - return name.Replace('.', '/'); - } - - TestStepFinishedEventArgs CreateTestStepFinishedEventArgs() - { - return new TestStepFinishedEventArgs(gallioReport, gallioTest, gallioTestStepRun); - } - } -} diff --git a/samples/Gallio/Gallio.SharpDevelop.Tests/Utils/MockTestResultsWriter.cs b/samples/Gallio/Gallio.SharpDevelop.Tests/Utils/MockTestResultsWriter.cs deleted file mode 100644 index a04455014e..0000000000 --- a/samples/Gallio/Gallio.SharpDevelop.Tests/Utils/MockTestResultsWriter.cs +++ /dev/null @@ -1,52 +0,0 @@ -// -// -// -// -// $Revision$ -// - -using System; -using Gallio.Extension; -using System.Collections.Generic; - -namespace Gallio.SharpDevelop.Tests.Utils -{ - public class MockTestResultsWriter : ITestResultsWriter - { - string fileName = String.Empty; - List testResults = new List(); - bool disposed; - - public MockTestResultsWriter(string fileName) - { - this.fileName = fileName; - } - - public string FileName { - get { return fileName; } - } - - public void Write(TestResult testResult) - { - testResults.Add(testResult); - } - - public List TestResults { - get { return testResults; } - } - - public TestResult FirstTestResult { - get { return testResults[0]; } - } - - public void Dispose() - { - disposed = true; - } - - public bool IsDisposed { - get { return disposed; } - set { disposed = value; } - } - } -} diff --git a/samples/Gallio/Gallio.SharpDevelop.Tests/Utils/MockTestResultsWriterFactory.cs b/samples/Gallio/Gallio.SharpDevelop.Tests/Utils/MockTestResultsWriterFactory.cs deleted file mode 100644 index 7e519d69d9..0000000000 --- a/samples/Gallio/Gallio.SharpDevelop.Tests/Utils/MockTestResultsWriterFactory.cs +++ /dev/null @@ -1,28 +0,0 @@ -// -// -// -// -// $Revision$ -// - -using System; -using Gallio.Extension; -using Gallio.SharpDevelop; - -namespace Gallio.SharpDevelop.Tests.Utils -{ - public class MockTestResultsWriterFactory : ITestResultsWriterFactory - { - MockTestResultsWriter testResultsWriter; - - public ITestResultsWriter Create(string fileName) - { - testResultsWriter = new MockTestResultsWriter(fileName); - return testResultsWriter; - } - - public MockTestResultsWriter TestResultsWriter { - get { return testResultsWriter; } - } - } -} diff --git a/samples/Gallio/Gallio.SharpDevelop.Tests/Utils/MockTestRunnerEvents.cs b/samples/Gallio/Gallio.SharpDevelop.Tests/Utils/MockTestRunnerEvents.cs deleted file mode 100644 index 72dcb19efd..0000000000 --- a/samples/Gallio/Gallio.SharpDevelop.Tests/Utils/MockTestRunnerEvents.cs +++ /dev/null @@ -1,76 +0,0 @@ -// -// -// -// -// $Revision$ -// - -using System; -using ICSharpCode.UnitTesting; -using Gallio.Runner.Events; - -namespace Gallio.SharpDevelop.Tests.Utils -{ - public class MockTestRunnerEvents : ITestRunnerEvents - { - #pragma warning disable 67 - - public event EventHandler LogEntrySubmitted; - public event EventHandler MessageReceived; - public event EventHandler InitializeStarted; - public event EventHandler InitializeFinished; - public event EventHandler DisposeStarted; - public event EventHandler DisposeFinished; - public event EventHandler ExploreStarted; - public event EventHandler ExploreFinished; - public event EventHandler RunStarted; - public event EventHandler RunFinished; - public event EventHandler TestDiscovered; - public event EventHandler AnnotationDiscovered; - public event EventHandler TestStepStarted; - public event EventHandler TestStepFinished; - public event EventHandler TestStepLifecyclePhaseChanged; - public event EventHandler TestStepMetadataAdded; - public event EventHandler TestStepLogAttach; - public event EventHandler TestStepLogStreamWrite; - public event EventHandler TestStepLogStreamEmbed; - public event EventHandler TestStepLogStreamBeginSectionBlock; - public event EventHandler TestStepLogStreamBeginMarkerBlock; - public event EventHandler TestStepLogStreamEndBlock; - - #pragma warning restore 67 - - public void FireTestStepFinishedEvent(string name) - { - TestStepFinishedEventArgs e = CreateTestStepFinishedEventArgs(name); - FireTestStepFinishedEvent(e); - } - - TestStepFinishedEventArgs CreateTestStepFinishedEventArgs(string testName) - { - GallioTestStepFinishedEventArgsFactory factory = new GallioTestStepFinishedEventArgsFactory(); - return factory.Create(testName); - } - - void FireTestStepFinishedEvent(TestStepFinishedEventArgs e) - { - if (TestStepFinished != null) { - TestStepFinished(this, e); - } - } - - public void FireTestStepFinishedEventForNonTestCase(string testName) - { - TestStepFinishedEventArgs e = CreateTestStepFinishedEventArgs(testName); - e.Test.IsTestCase = false; - FireTestStepFinishedEvent(e); - } - - public void FireDisposeStartedEvent() - { - if (DisposeStarted != null) { - DisposeStarted(this, new DisposeStartedEventArgs()); - } - } - } -} diff --git a/samples/Gallio/Gallio.SharpDevelop.Tests/Utils/Tests/CreateAssertionFailureBodyTagTestFixture.cs b/samples/Gallio/Gallio.SharpDevelop.Tests/Utils/Tests/CreateAssertionFailureBodyTagTestFixture.cs deleted file mode 100644 index 1e0f85b3ad..0000000000 --- a/samples/Gallio/Gallio.SharpDevelop.Tests/Utils/Tests/CreateAssertionFailureBodyTagTestFixture.cs +++ /dev/null @@ -1,175 +0,0 @@ -// -// -// -// -// $Revision$ -// - -using System; -using Gallio.Common.Markup; -using Gallio.Common.Markup.Tags; -using Gallio.SharpDevelop.Tests.Utils; -using NUnit.Framework; - -namespace Gallio.SharpDevelop.Tests.Utils.Tests -{ - [TestFixture] - public class CreateAssertionFailureBodyTagTestFixture - { - StructuredStream structuredStream; - BodyTag bodyTag; - MarkerTag assertionFailureMarkerTag; - SectionTag expectedValueToBeTrueSectionTag; - TextTag expectedValueToBeTrueTextTag; - MarkerTag monoSpaceMarkerTag; - TextTag textTagAfterMonoSpaceMarkerTag; - MarkerTag stackTraceMarkerTag; - TextTag stackTraceTextTag; - MarkerTag codeLocationMarkerTag; - TextTag codeLocationTextTag; - - [SetUp] - public void Init() - { - GallioBodyTagFactory factory = new GallioBodyTagFactory(); - structuredStream = factory.CreateAssertionFailureStructuredStream(); - bodyTag = structuredStream.Body; - assertionFailureMarkerTag = GetFirstChildMarkerTag(bodyTag); - expectedValueToBeTrueSectionTag = GetFirstChildSectionTag(assertionFailureMarkerTag); - expectedValueToBeTrueTextTag = GetFirstChildTextTag(expectedValueToBeTrueSectionTag); - monoSpaceMarkerTag = GetSecondChildMarkerTag(expectedValueToBeTrueSectionTag); - textTagAfterMonoSpaceMarkerTag = GetThirdChildTextTag(expectedValueToBeTrueSectionTag); - stackTraceMarkerTag = GetFourthChildMarkerTag(expectedValueToBeTrueSectionTag); - stackTraceTextTag = GetFirstChildTextTag(stackTraceMarkerTag); - codeLocationMarkerTag = GetSecondChildMarkerTag(stackTraceMarkerTag); - codeLocationTextTag = GetFirstChildTextTag(codeLocationMarkerTag); - } - - MarkerTag GetFirstChildMarkerTag(ContainerTag parentTag) - { - return GetFirstChildTag(parentTag) as MarkerTag; - } - - Tag GetFirstChildTag(ContainerTag parentTag) - { - return GetChildTagAtPosition(parentTag, 1); - } - - Tag GetChildTagAtPosition(ContainerTag parentTag, int position) - { - if (TagHasChildTagAtPosition(parentTag, position)) { - int index = position - 1; - return parentTag.Contents[index]; - } - return null; - } - - bool TagHasChildTagAtPosition(ContainerTag tag, int position) - { - if (tag != null) { - return tag.Contents.Count >= position; - } - return false; - } - - SectionTag GetFirstChildSectionTag(ContainerTag parentTag) - { - return GetFirstChildTag(parentTag) as SectionTag; - } - - TextTag GetFirstChildTextTag(ContainerTag parentTag) - { - return GetFirstChildTag(parentTag) as TextTag; - } - - MarkerTag GetSecondChildMarkerTag(ContainerTag parentTag) - { - return GetSecondChildTag(parentTag) as MarkerTag; - } - - Tag GetSecondChildTag(ContainerTag parentTag) - { - return GetChildTagAtPosition(parentTag, 2); - } - - TextTag GetThirdChildTextTag(ContainerTag parentTag) - { - return GetChildTagAtPosition(parentTag, 3) as TextTag; - } - - MarkerTag GetFourthChildMarkerTag(ContainerTag parentTag) - { - return GetChildTagAtPosition(parentTag, 4) as MarkerTag; - } - - [Test] - public void StructuredStreamNameIsFailures() - { - Assert.AreEqual("Failures", structuredStream.Name); - } - - [Test] - public void BodyTagHasOneChildTag() - { - Assert.AreEqual(1, bodyTag.Contents.Count); - } - - [Test] - public void BodyTagChildIsMarkerTagWithClassSetToAssertionFailure() - { - Assert.AreEqual("AssertionFailure", assertionFailureMarkerTag.Class); - } - - [Test] - public void AssertionFailureMarkerTagHasSectionTagContentsWithTagNameEqualToExpectedValueToBeTrue() - { - string expectedName = "Expected value to be true."; - Assert.AreEqual(expectedName, expectedValueToBeTrueSectionTag.Name); - } - - [Test] - public void ExpectedValueToBeTrueSectionTagHasTextTagChildWithTextSetToUserAssertionMessage() - { - string expectedText = "User assertion message."; - Assert.AreEqual(expectedText, expectedValueToBeTrueTextTag.Text); - } - - [Test] - public void ExpectedValueToBeTrueSectionTagHasMarkerTagChildWithClassSetToMonospace() - { - Assert.AreEqual("Monospace", monoSpaceMarkerTag.Class); - } - - [Test] - public void ExpectedValueToBeTrueSectionTagHasTextTagChildAfterMonospaceTagChild() - { - Assert.IsNotNull(textTagAfterMonoSpaceMarkerTag); - } - - [Test] - public void ExpectedValueToBeTrueSectionTagHasMarkerTagWithClassSetToStackTrace() - { - Assert.AreEqual("StackTrace", stackTraceMarkerTag.Class); - } - - [Test] - public void StackTraceTagHasFirstChildTextTagWithFirstLineOfStackTrace() - { - string expectedText = " at GallioTest.MyClass.AssertWithFailureMessage() in "; - Assert.AreEqual(expectedText, stackTraceTextTag.Text); - } - - [Test] - public void StackTraceTagHasMarkerTagChildWithClassSetToCodeLocation() - { - Assert.AreEqual("CodeLocation", codeLocationMarkerTag.Class); - } - - [Test] - public void CodeLocationMarkerHasTextTagWithCodeLocationText() - { - string expectedText = @"d:\temp\test\GallioTest\MyClass.cs:line 46 "; - Assert.AreEqual(expectedText, codeLocationTextTag.Text); - } - } -} diff --git a/samples/Gallio/Gallio.SharpDevelop.Tests/Utils/Tests/MockTestResultsWriterFactoryTests.cs b/samples/Gallio/Gallio.SharpDevelop.Tests/Utils/Tests/MockTestResultsWriterFactoryTests.cs deleted file mode 100644 index 42f1b70cfd..0000000000 --- a/samples/Gallio/Gallio.SharpDevelop.Tests/Utils/Tests/MockTestResultsWriterFactoryTests.cs +++ /dev/null @@ -1,82 +0,0 @@ -// -// -// -// -// $Revision$ -// - -using System; -using Gallio.Extension; -using Gallio.SharpDevelop.Tests.Utils; -using NUnit.Framework; - -namespace Gallio.SharpDevelop.Tests.Utils.Tests -{ - [TestFixture] - public class MockTestResultsWriterFactoryTests - { - MockTestResultsWriterFactory factory; - - [SetUp] - public void Init() - { - factory = new MockTestResultsWriterFactory(); - } - - [Test] - public void TestResultsWritersSavedByFactory() - { - ITestResultsWriter writer = factory.Create("testresults.txt"); - Assert.AreEqual(writer, factory.TestResultsWriter); - } - - [Test] - public void TestResultsWriterCreatedIsMockTestResultsWriter() - { - MockTestResultsWriter writer = factory.Create("abc.txt") as MockTestResultsWriter; - Assert.IsNotNull(writer); - } - - [Test] - public void TestResultsWriterCreatedWithFileNamePassedToFactoryCreateMethod() - { - MockTestResultsWriter writer = factory.Create("testresults.txt") as MockTestResultsWriter; - Assert.AreEqual("testresults.txt", writer.FileName); - } - - [Test] - public void TestResultsWriterSavesTestResultsWritten() - { - TestResult firstResult = new TestResult("test1"); - TestResult secondResult = new TestResult("test2"); - MockTestResultsWriter writer = factory.Create("testresults.txt") as MockTestResultsWriter; - writer.Write(firstResult); - writer.Write(secondResult); - - TestResult[] expectedTestResults = new TestResult[] { firstResult, secondResult }; - - Assert.AreEqual(expectedTestResults, writer.TestResults.ToArray()); - } - - [Test] - public void FirstTestResultsWriterReturnsFirstTestResultsWriter() - { - TestResult firstResult = new TestResult("test1"); - TestResult secondResult = new TestResult("test2"); - MockTestResultsWriter writer = factory.Create("testresults.txt") as MockTestResultsWriter; - writer.Write(firstResult); - writer.Write(secondResult); - - Assert.AreEqual(firstResult, writer.FirstTestResult); - } - - [Test] - public void IsDisposedCalledReturnsTrueAfterDisposeMethodCalled() - { - MockTestResultsWriter writer = factory.Create("testresults.txt") as MockTestResultsWriter; - writer.IsDisposed = false; - writer.Dispose(); - Assert.IsTrue(writer.IsDisposed); - } - } -} diff --git a/samples/Gallio/Gallio.SharpDevelop.Tests/Utils/Tests/MockTestRunnerEventsTestFixture.cs b/samples/Gallio/Gallio.SharpDevelop.Tests/Utils/Tests/MockTestRunnerEventsTestFixture.cs deleted file mode 100644 index 80ad46ae04..0000000000 --- a/samples/Gallio/Gallio.SharpDevelop.Tests/Utils/Tests/MockTestRunnerEventsTestFixture.cs +++ /dev/null @@ -1,69 +0,0 @@ -// -// -// -// -// $Revision$ -// - -using System; -using ICSharpCode.UnitTesting; -using Gallio.Runner.Events; -using Gallio.SharpDevelop.Tests.Utils; -using NUnit.Framework; - -namespace Gallio.SharpDevelop.Tests.Utils.Tests -{ - [TestFixture] - public class MockTestRunnerEventsTestFixture - { - MockTestRunnerEvents testRunnerEvents; - TestStepFinishedEventArgs testStepFinishedEventArgs; - - [SetUp] - public void Init() - { - testRunnerEvents = new MockTestRunnerEvents(); - testRunnerEvents.TestStepFinished += delegate (object source, TestStepFinishedEventArgs e) { - testStepFinishedEventArgs = e; - }; - } - - [Test] - public void FireTestStepFinishedEventWithTestResultCreatesGallioTestDataWithExpectedFullName() - { - testRunnerEvents.FireTestStepFinishedEvent("MyNamespace/MyTests/MyTestMethod"); - - string expectedFullName = "MyNamespace/MyTests/MyTestMethod"; - string actualFullName = testStepFinishedEventArgs.Test.FullName; - Assert.AreEqual(expectedFullName, actualFullName); - } - - [Test] - public void FireTestStepFinishedEventCreatesGallioTestDataWithIsTestCaseSetToTrue() - { - testRunnerEvents.FireTestStepFinishedEvent("testName"); - - Assert.IsTrue(testStepFinishedEventArgs.Test.IsTestCase); - } - - [Test] - public void FireTestStepFinishedEventForNonTestCaseCreatesGallioTestDataIsTestCaseSetToFalse() - { - testRunnerEvents.FireTestStepFinishedEventForNonTestCase("testName"); - - Assert.IsFalse(testStepFinishedEventArgs.Test.IsTestCase); - } - - [Test] - public void FireDisposeStartedEventTriggersEvent() - { - DisposeStartedEventArgs eventArgs = null; - testRunnerEvents.DisposeStarted += delegate(object sender, DisposeStartedEventArgs e) { - eventArgs = e; - }; - testRunnerEvents.FireDisposeStartedEvent(); - - Assert.IsNotNull(eventArgs); - } - } -} diff --git a/samples/Gallio/Gallio.SharpDevelop.sln b/samples/Gallio/Gallio.SharpDevelop.sln deleted file mode 100644 index 6298d44b22..0000000000 --- a/samples/Gallio/Gallio.SharpDevelop.sln +++ /dev/null @@ -1,30 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -# SharpDevelop 4.0.0.5840 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Gallio.SharpDevelop", "Gallio.SharpDevelop\Gallio.SharpDevelop.csproj", "{88D3DC5E-8A91-4DCE-A785-CC37DE0AA0EC}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Gallio.SharpDevelop.Tests", "Gallio.SharpDevelop.Tests\Gallio.SharpDevelop.Tests.csproj", "{3F6C539D-DB38-41B4-A5B3-B9A52AE607CD}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Gallio.Extension", "Gallio.Extension\Gallio.Extension.csproj", "{98030C86-7B0F-4813-AC4D-9FFCF00CF81F}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|x86 = Debug|x86 - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {88D3DC5E-8A91-4DCE-A785-CC37DE0AA0EC}.Debug|x86.Build.0 = Debug|x86 - {88D3DC5E-8A91-4DCE-A785-CC37DE0AA0EC}.Debug|x86.ActiveCfg = Debug|x86 - {88D3DC5E-8A91-4DCE-A785-CC37DE0AA0EC}.Release|x86.Build.0 = Release|x86 - {88D3DC5E-8A91-4DCE-A785-CC37DE0AA0EC}.Release|x86.ActiveCfg = Release|x86 - {3F6C539D-DB38-41B4-A5B3-B9A52AE607CD}.Debug|x86.Build.0 = Debug|x86 - {3F6C539D-DB38-41B4-A5B3-B9A52AE607CD}.Debug|x86.ActiveCfg = Debug|x86 - {3F6C539D-DB38-41B4-A5B3-B9A52AE607CD}.Release|x86.Build.0 = Release|x86 - {3F6C539D-DB38-41B4-A5B3-B9A52AE607CD}.Release|x86.ActiveCfg = Release|x86 - {98030C86-7B0F-4813-AC4D-9FFCF00CF81F}.Debug|x86.Build.0 = Debug|x86 - {98030C86-7B0F-4813-AC4D-9FFCF00CF81F}.Debug|x86.ActiveCfg = Debug|x86 - {98030C86-7B0F-4813-AC4D-9FFCF00CF81F}.Release|x86.Build.0 = Release|x86 - {98030C86-7B0F-4813-AC4D-9FFCF00CF81F}.Release|x86.ActiveCfg = Release|x86 - EndGlobalSection -EndGlobal diff --git a/samples/Gallio/Gallio.SharpDevelop/Gallio.SharpDevelop.addin b/samples/Gallio/Gallio.SharpDevelop/Gallio.SharpDevelop.addin deleted file mode 100644 index a24ea7cf00..0000000000 --- a/samples/Gallio/Gallio.SharpDevelop/Gallio.SharpDevelop.addin +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/samples/Gallio/Gallio.SharpDevelop/Gallio.SharpDevelop.csproj b/samples/Gallio/Gallio.SharpDevelop/Gallio.SharpDevelop.csproj deleted file mode 100644 index 334dcf2f6d..0000000000 --- a/samples/Gallio/Gallio.SharpDevelop/Gallio.SharpDevelop.csproj +++ /dev/null @@ -1,86 +0,0 @@ - - - - {88D3DC5E-8A91-4DCE-A785-CC37DE0AA0EC} - Debug - x86 - Library - Gallio.SharpDevelop - Gallio.SharpDevelop - v4.0 - Properties - C:\Users\Matt\AppData\Roaming\ICSharpCode/SharpDevelop3.0\Settings.SourceAnalysis - False - False - 4 - false - - - x86 - False - Auto - 4194304 - 4096 - - - ..\..\..\AddIns\Samples\Gallio - true - Full - False - False - DEBUG;TRACE - - - ..\..\..\AddIns\Samples\Gallio - false - None - True - False - TRACE - - - - - ..\Gallio\bin\Gallio.dll - - - ..\..\..\bin\ICSharpCode.Core.dll - False - - - ..\..\..\bin\ICSharpCode.SharpDevelop.dll - False - - - ..\..\..\bin\ICSharpCode.SharpDevelop.Dom.dll - False - - - - - ..\..\..\AddIns\Analysis\UnitTesting\UnitTesting.dll - - - - - - - - - - - - - - - - Always - - - - - {98030C86-7B0F-4813-AC4D-9FFCF00CF81F} - Gallio.Extension - - - \ No newline at end of file diff --git a/samples/Gallio/Gallio.SharpDevelop/GallioEchoConsoleApplication.cs b/samples/Gallio/Gallio.SharpDevelop/GallioEchoConsoleApplication.cs deleted file mode 100644 index e2ce0c5ff9..0000000000 --- a/samples/Gallio/Gallio.SharpDevelop/GallioEchoConsoleApplication.cs +++ /dev/null @@ -1,96 +0,0 @@ -// -// -// -// -// $Revision$ -// - -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Text; -using ICSharpCode.Core; -using ICSharpCode.UnitTesting; - -namespace Gallio.SharpDevelop -{ - public class GallioEchoConsoleApplication - { - string fileName = String.Empty; - SelectedTests selectedTests; - StringBuilder commandLine = new StringBuilder(); - List testRunnerExtensions = - new List(); - - public GallioEchoConsoleApplication(SelectedTests selectedTests, string fileName) - { - this.selectedTests = selectedTests; - this.fileName = fileName; - } - - public GallioEchoConsoleApplication(SelectedTests selectedTests) - : this(selectedTests, String.Empty) - { - } - - public string FileName { - get { return fileName; } - } - - public List TestRunnerExtensions { - get { return testRunnerExtensions; } - } - - public string GetArguments() - { - AppendDotNet4Framework(); - AppendTestRunnerExtensions(); - AppendAssemblyToTest(); - - return commandLine.ToString().TrimEnd(); - } - - void AppendDotNet4Framework() - { - AppendArgument("/rv:v4.0.30319"); - - } - - void AppendTestRunnerExtensions() - { - foreach (TestRunnerExtensionCommandLineArgument arg in testRunnerExtensions) { - AppendArgument(arg.ToString()); - } - } - - void AppendArgument(string argument) - { - commandLine.Append(argument); - commandLine.Append(' '); - } - - void AppendAssemblyToTest() - { - AppendQuoted(selectedTests.Project.OutputAssemblyFullPath); - } - - void AppendQuoted(string argument) - { - commandLine.AppendFormat("\"{0}\"", argument); - } - - public ProcessStartInfo GetProcessStartInfo() - { - ProcessStartInfo startInfo = new ProcessStartInfo(); - startInfo.FileName = fileName; - startInfo.Arguments = GetArguments(); - startInfo.WorkingDirectory = GetWorkingDirectory(); - return startInfo; - } - - string GetWorkingDirectory() - { - return StringParser.Parse("${addinpath:ICSharpCode.Gallio}"); - } - } -} diff --git a/samples/Gallio/Gallio.SharpDevelop/GallioEchoConsoleApplicationFactory.cs b/samples/Gallio/Gallio.SharpDevelop/GallioEchoConsoleApplicationFactory.cs deleted file mode 100644 index ddfd79d674..0000000000 --- a/samples/Gallio/Gallio.SharpDevelop/GallioEchoConsoleApplicationFactory.cs +++ /dev/null @@ -1,41 +0,0 @@ -// -// -// -// -// $Revision$ -// - -using System; -using System.Collections.Generic; -using ICSharpCode.UnitTesting; - -namespace Gallio.SharpDevelop -{ - public class GallioEchoConsoleApplicationFactory - { - public static readonly string AddInTreePath = "/SharpDevelop/UnitTesting/GallioEchoApplication"; - - string gallioEchoConsoleApplicationFileName = "Gallio.Echo.exe"; - - public GallioEchoConsoleApplicationFactory() - : this(new UnitTestAddInTree()) - { - } - - public GallioEchoConsoleApplicationFactory(IAddInTree addInTree) - { - ReadFileName(addInTree); - } - - void ReadFileName(IAddInTree addInTree) - { - List items = addInTree.BuildItems(AddInTreePath, this); - gallioEchoConsoleApplicationFileName = items[0]; - } - - public GallioEchoConsoleApplication Create(SelectedTests selectedTests) - { - return new GallioEchoConsoleApplication(selectedTests, gallioEchoConsoleApplicationFileName); - } - } -} diff --git a/samples/Gallio/Gallio.SharpDevelop/GallioEchoConsoleApplicationProcessStartInfo.cs b/samples/Gallio/Gallio.SharpDevelop/GallioEchoConsoleApplicationProcessStartInfo.cs deleted file mode 100644 index 678e732e3a..0000000000 --- a/samples/Gallio/Gallio.SharpDevelop/GallioEchoConsoleApplicationProcessStartInfo.cs +++ /dev/null @@ -1,32 +0,0 @@ -// -// -// -// -// $Revision$ -// - -using System; -using System.Diagnostics; -using ICSharpCode.UnitTesting; - -namespace Gallio.SharpDevelop -{ - public class GallioEchoConsoleApplicationProcessStartInfo - { - ProcessStartInfo processStartInfo = new ProcessStartInfo(); - - public GallioEchoConsoleApplicationProcessStartInfo(SelectedTests selectedTests, string testResultsFileName) - { - GallioEchoConsoleApplicationFactory factory = new GallioEchoConsoleApplicationFactory(); - GallioEchoConsoleApplication app = factory.Create(selectedTests); - SharpDevelopTestRunnerExtensionCommandLineArgument argument = new SharpDevelopTestRunnerExtensionCommandLineArgument(); - argument.TestResultsFileName = testResultsFileName; - app.TestRunnerExtensions.Add(argument); - processStartInfo = app.GetProcessStartInfo(); - } - - public ProcessStartInfo ProcessStartInfo { - get { return processStartInfo; } - } - } -} diff --git a/samples/Gallio/Gallio.SharpDevelop/GallioTestDebugger.cs b/samples/Gallio/Gallio.SharpDevelop/GallioTestDebugger.cs deleted file mode 100644 index bc3762a7e6..0000000000 --- a/samples/Gallio/Gallio.SharpDevelop/GallioTestDebugger.cs +++ /dev/null @@ -1,33 +0,0 @@ -// -// -// -// -// $Revision$ -// - -using System; -using System.Diagnostics; -using ICSharpCode.UnitTesting; - -namespace Gallio.SharpDevelop -{ - public class GallioTestDebugger : TestDebuggerBase - { - public GallioTestDebugger() - { - } - - protected override ProcessStartInfo GetProcessStartInfo(SelectedTests selectedTests) - { - GallioEchoConsoleApplicationProcessStartInfo startInfo = - new GallioEchoConsoleApplicationProcessStartInfo(selectedTests, base.TestResultsMonitor.FileName); - startInfo.ProcessStartInfo.Arguments += " /d"; - return startInfo.ProcessStartInfo; - } - - protected override TestResult CreateTestResultForTestFramework(TestResult testResult) - { - return new GallioTestResult(testResult); - } - } -} diff --git a/samples/Gallio/Gallio.SharpDevelop/GallioTestFramework.cs b/samples/Gallio/Gallio.SharpDevelop/GallioTestFramework.cs deleted file mode 100644 index 003dc4984b..0000000000 --- a/samples/Gallio/Gallio.SharpDevelop/GallioTestFramework.cs +++ /dev/null @@ -1,128 +0,0 @@ -// -// -// -// -// $Revision$ -// - -using System; -using System.Collections.Generic; -using System.Linq; - -using ICSharpCode.SharpDevelop.Dom; -using ICSharpCode.SharpDevelop.Project; -using ICSharpCode.UnitTesting; - -namespace Gallio.SharpDevelop -{ - public class GallioTestFramework : ITestFramework - { - public GallioTestFramework() - { - } - - public bool IsTestProject(IProject project) - { - if (project != null) { - foreach (ProjectItem projectItem in project.Items) { - ReferenceProjectItem referenceProjectItem = projectItem as ReferenceProjectItem; - if (IsMbUnitFrameworkAssemblyReference(referenceProjectItem)) { - return true; - } - } - } - return false; - } - - bool IsMbUnitFrameworkAssemblyReference(ReferenceProjectItem referenceProjectItem) - { - if (referenceProjectItem != null) { - string name = referenceProjectItem.ShortName; - return name.Equals("MbUnit", StringComparison.OrdinalIgnoreCase); - } - return false; - } - - public ITestRunner CreateTestRunner() - { - return new GallioTestRunner(); - } - - public ITestRunner CreateTestDebugger() - { - return new GallioTestDebugger(); - } - - public bool IsTestClass(IClass c) - { - StringComparer nameComparer = GetNameComparer(c); - if (nameComparer != null) { - MbUnitTestAttributeName testAttributeName = new MbUnitTestAttributeName("TestFixture", nameComparer); - foreach (IAttribute attribute in c.Attributes) { - if (testAttributeName.IsEqual(attribute)) { - return true; - } - } - } - return false; - } - - StringComparer GetNameComparer(IClass c) - { - if (c != null) { - IProjectContent projectContent = c.ProjectContent; - if (projectContent != null) { - LanguageProperties language = projectContent.Language; - if (language != null) { - return language.NameComparer; - } - } - } - return null; - } - - public bool IsTestMember(IMember member) - { - var method = member as IMethod; - if (method != null) { - return IsTestMethod(method); - } - return false; - } - - public IEnumerable GetTestMembersFor(IClass c) - { - return c.Methods.Where(IsTestMethod).Select(member => new TestMember(member)); - } - - /// - /// Determines whether the method is a test method. A method - /// is considered to be a test method if it contains the NUnit Test attribute. - /// If the method has parameters it cannot be a test method. - /// - bool IsTestMethod(IMember member) - { - if (member == null) { - return false; - } - - StringComparer nameComparer = GetNameComparer(member.DeclaringType); - if (nameComparer != null) { - MbUnitTestAttributeName testAttribute = new MbUnitTestAttributeName("Test", nameComparer); - foreach (IAttribute attribute in member.Attributes) { - if (testAttribute.IsEqual(attribute)) { - IMethod method = (IMethod)member; - if (method.Parameters.Count == 0) { - return true; - } - } - } - } - return false; - } - - public bool IsBuildNeededBeforeTestRun { - get { return true; } - } - } -} diff --git a/samples/Gallio/Gallio.SharpDevelop/GallioTestResult.cs b/samples/Gallio/Gallio.SharpDevelop/GallioTestResult.cs deleted file mode 100644 index 9d54a3b0ee..0000000000 --- a/samples/Gallio/Gallio.SharpDevelop/GallioTestResult.cs +++ /dev/null @@ -1,54 +0,0 @@ -// -// -// -// -// $Revision$ -// - -using System; -using System.Text.RegularExpressions; -using System.IO; -using ICSharpCode.SharpDevelop.Dom; -using ICSharpCode.UnitTesting; - -namespace Gallio.SharpDevelop -{ - public class GallioTestResult : TestResult - { - public GallioTestResult(TestResult testResult) - : base(testResult.Name) - { - Message = testResult.Message; - ResultType = testResult.ResultType; - StackTrace = testResult.StackTrace; - } - - protected override void OnStackTraceChanged() - { - GetFilePositionFromStackTrace(); - } - - /// - /// Stack trace: - /// at GallioTest.MyClass.AssertWithFailureMessage() in d:\temp\test\..\GallioTest\MyClass.cs:line 46 - /// - void GetFilePositionFromStackTrace() - { - Match match = Regex.Match(StackTrace, @"\sin\s(.*?):line\s(\d+)", RegexOptions.Multiline); - if (match.Success) { - SetStackTraceFilePosition(match.Groups); - } else { - StackTraceFilePosition = FilePosition.Empty; - } - } - - void SetStackTraceFilePosition(GroupCollection groups) - { - string fileName = Path.GetFullPath(groups[1].Value); - int line = Convert.ToInt32(groups[2].Value); - int column = 1; - - StackTraceFilePosition = new FilePosition(fileName, line, column); - } - } -} diff --git a/samples/Gallio/Gallio.SharpDevelop/GallioTestRunner.cs b/samples/Gallio/Gallio.SharpDevelop/GallioTestRunner.cs deleted file mode 100644 index d8686673a3..0000000000 --- a/samples/Gallio/Gallio.SharpDevelop/GallioTestRunner.cs +++ /dev/null @@ -1,32 +0,0 @@ -// -// -// -// -// $Revision$ -// - -using System; -using System.Diagnostics; -using ICSharpCode.UnitTesting; - -namespace Gallio.SharpDevelop -{ - public class GallioTestRunner : TestProcessRunnerBase - { - public GallioTestRunner() - { - } - - protected override ProcessStartInfo GetProcessStartInfo(SelectedTests selectedTests) - { - GallioEchoConsoleApplicationProcessStartInfo startInfo = - new GallioEchoConsoleApplicationProcessStartInfo(selectedTests, base.TestResultsMonitor.FileName); - return startInfo.ProcessStartInfo; - } - - protected override TestResult CreateTestResultForTestFramework(TestResult testResult) - { - return new GallioTestResult(testResult); - } - } -} diff --git a/samples/Gallio/Gallio.SharpDevelop/MbUnitTestAttributeName.cs b/samples/Gallio/Gallio.SharpDevelop/MbUnitTestAttributeName.cs deleted file mode 100644 index 5bcc36d6c6..0000000000 --- a/samples/Gallio/Gallio.SharpDevelop/MbUnitTestAttributeName.cs +++ /dev/null @@ -1,47 +0,0 @@ -// -// -// -// -// $Revision$ -// - -using System; -using ICSharpCode.SharpDevelop.Dom; - -namespace Gallio.SharpDevelop -{ - public class MbUnitTestAttributeName - { - string name = String.Empty; - string qualifiedName = String.Empty; - string fullyQualifiedName = String.Empty; - StringComparer nameComparer; - - public MbUnitTestAttributeName(string name, StringComparer nameComparer) - { - this.name = name; - this.nameComparer = nameComparer; - qualifiedName = String.Concat(name, "Attribute"); - fullyQualifiedName = String.Concat("MbUnit.Framework.", name, "Attribute"); - } - - /// - /// Determines whether the specified attribute name is a - /// match to this attribute. - /// - public bool IsEqual(string attributeName) - { - if (nameComparer.Equals(attributeName, name) || - nameComparer.Equals(attributeName, qualifiedName) || - nameComparer.Equals(attributeName, fullyQualifiedName)) { - return true; - } - return false; - } - - public bool IsEqual(IAttribute attribute) - { - return IsEqual(attribute.AttributeType.FullyQualifiedName); - } - } -} diff --git a/samples/Gallio/Gallio.SharpDevelop/Properties/AssemblyInfo.cs b/samples/Gallio/Gallio.SharpDevelop/Properties/AssemblyInfo.cs deleted file mode 100644 index 1f2c22bb80..0000000000 --- a/samples/Gallio/Gallio.SharpDevelop/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,31 +0,0 @@ -#region Using directives - -using System; -using System.Reflection; -using System.Runtime.InteropServices; - -#endregion - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Gallio.SharpDevelop")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("Gallio.SharpDevelop")] -[assembly: AssemblyCopyright("Copyright 2010")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// This sets the default COM visibility of types in the assembly to invisible. -// If you need to expose a type to COM, use [ComVisible(true)] on that type. -[assembly: ComVisible(false)] - -// The assembly version has following format : -// -// Major.Minor.Build.Revision -// -// You can specify all the values or you can use the default the Revision and -// Build Numbers by using the '*' as shown below: -[assembly: AssemblyVersion("0.1")] diff --git a/samples/Gallio/Gallio.SharpDevelop/SharpDevelopTestRunnerExtensionCommandLineArgument.cs b/samples/Gallio/Gallio.SharpDevelop/SharpDevelopTestRunnerExtensionCommandLineArgument.cs deleted file mode 100644 index eebf2371b2..0000000000 --- a/samples/Gallio/Gallio.SharpDevelop/SharpDevelopTestRunnerExtensionCommandLineArgument.cs +++ /dev/null @@ -1,38 +0,0 @@ -// -// -// -// -// $Revision$ -// - -using System; -using Gallio.Extension; - -namespace Gallio.SharpDevelop -{ - public class SharpDevelopTestRunnerExtensionCommandLineArgument : TestRunnerExtensionCommandLineArgument - { - string testResultsFileName = String.Empty; - - public SharpDevelopTestRunnerExtensionCommandLineArgument() - : base(GetFullyQualifiedTypeName()) - { - } - - static string GetFullyQualifiedTypeName() - { - Type type = typeof(SharpDevelopTestRunnerExtension); - string typeName = type.FullName; - string assemblyFileName = type.Assembly.ManifestModule.ScopeName; - return String.Format("{0},{1}", typeName, assemblyFileName); - } - - public string TestResultsFileName { - get { return testResultsFileName; } - set { - testResultsFileName = value; - Parameters = testResultsFileName; - } - } - } -} diff --git a/samples/Gallio/Gallio.SharpDevelop/TestRunnerExtensionCommandLineArgument.cs b/samples/Gallio/Gallio.SharpDevelop/TestRunnerExtensionCommandLineArgument.cs deleted file mode 100644 index 6978b4c41f..0000000000 --- a/samples/Gallio/Gallio.SharpDevelop/TestRunnerExtensionCommandLineArgument.cs +++ /dev/null @@ -1,51 +0,0 @@ -// -// -// -// -// $Revision$ -// - -using System; - -namespace Gallio.SharpDevelop -{ - public class TestRunnerExtensionCommandLineArgument - { - string type; - string parameters = String.Empty; - - public TestRunnerExtensionCommandLineArgument(string type) - { - this.type = type; - } - - public string Type { - get { return type; } - } - - public string Parameters { - get { return parameters; } - set { parameters = value; } - } - - public override string ToString() - { - return String.Format("/re:\"{0}{1}\"", - GetTypeName(), - GetParameters()); - } - - string GetTypeName() - { - return type; - } - - string GetParameters() - { - if (String.IsNullOrEmpty(parameters)) { - return String.Empty; - } - return String.Format(";{0}", parameters); - } - } -} diff --git a/samples/Gallio/readme.rtf b/samples/Gallio/readme.rtf deleted file mode 100644 index c62ad1b501dd51d8f588d4b388045001c9aad74a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 771 zcmY*WON-ku5bim@V$MAn+ezq_JuS2>g|w75d(%a>Mz*LTsd^+SA^*KIjf)N(ETW5 z!d%1N95BHTJi#yi|9HKwF5;sY&|#F>NBEv}MrAT=t4&k2^lj^h$E!FRJpD0FZA9rC z5oA=t`IAw7wsaBQ#F;h^@GPx09$p+_>@j6{Qpz~dk)+htJh|d(GgVJexG!^`&_917YE}`8qbO2!6Uu4{Q>Iinw@KV=urp3ZLyt1z9Xgdxd#f7%)AL2 zlY=ylT+SYj>#Bj5pkzj9p)1BJSbzSsm=hiBOwT#Gfp<8qj}KPZdo^1pWl0`_rE3B^ a4G>##90lv#J^$P-QD0%+0N<+X>cfAD2oEO! diff --git a/src/Automated.proj b/src/Automated.proj index a3fd8724ab..3ff705b4d0 100644 --- a/src/Automated.proj +++ b/src/Automated.proj @@ -115,9 +115,6 @@ -