Browse Source

Merge Machine.Specifications (MSpec) addin created by Tomasz Tretkowski.

pull/23/head
Matt Ward 15 years ago
parent
commit
b852907e7d
  1. 264
      SharpDevelop.Tests.sln
  2. 56
      src/AddIns/Analysis/MachineSpecifications/Libraries/Machine.Fakes/License.txt
  3. BIN
      src/AddIns/Analysis/MachineSpecifications/Libraries/Machine.Fakes/Machine.Fakes.Adapters.RhinoMocks.dll
  4. BIN
      src/AddIns/Analysis/MachineSpecifications/Libraries/Machine.Fakes/Machine.Fakes.dll
  5. BIN
      src/AddIns/Analysis/MachineSpecifications/Libraries/RhinoMocks.3.6/Rhino.Mocks.dll
  6. 2
      src/AddIns/Analysis/MachineSpecifications/Libraries/RhinoMocks.3.6/acknowledgements.txt
  7. 25
      src/AddIns/Analysis/MachineSpecifications/Libraries/RhinoMocks.3.6/license.txt
  8. 53
      src/AddIns/Analysis/MachineSpecifications/Libraries/developwithpassion.specifications.rhinomocks.0.4.13.0/License.txt
  9. BIN
      src/AddIns/Analysis/MachineSpecifications/Libraries/developwithpassion.specifications.rhinomocks.0.4.13.0/developwithpassion.specifications.dll
  10. BIN
      src/AddIns/Analysis/MachineSpecifications/Libraries/developwithpassion.specifications.rhinomocks.0.4.13.0/developwithpassion.specifications.rhinomocks.dll
  11. 21
      src/AddIns/Analysis/MachineSpecifications/MachineSpecifications.Tests/Data/MSpecUnitTestMonitorTestsSampleData.xml
  12. 96
      src/AddIns/Analysis/MachineSpecifications/MachineSpecifications.Tests/MachineSpecifications.Tests.csproj
  13. 31
      src/AddIns/Analysis/MachineSpecifications/MachineSpecifications.Tests/Properties/AssemblyInfo.cs
  14. 70
      src/AddIns/Analysis/MachineSpecifications/MachineSpecifications.Tests/Src/ClassFilterBuilder.cs
  15. 193
      src/AddIns/Analysis/MachineSpecifications/MachineSpecifications.Tests/Src/MSpecTestFrameworkTests.cs
  16. 52
      src/AddIns/Analysis/MachineSpecifications/MachineSpecifications.Tests/Src/MSpecUnitTestMonitorTests.cs
  17. 8
      src/AddIns/Analysis/MachineSpecifications/MachineSpecifications.Tests/packages.config
  18. 77
      src/AddIns/Analysis/MachineSpecifications/MachineSpecifications.sln
  19. 24
      src/AddIns/Analysis/MachineSpecifications/MachineSpecifications/AddInWritingHelp.txt
  20. 31
      src/AddIns/Analysis/MachineSpecifications/MachineSpecifications/Configuration/AssemblyInfo.cs
  21. 15
      src/AddIns/Analysis/MachineSpecifications/MachineSpecifications/MachineSpecifications.addin
  22. 130
      src/AddIns/Analysis/MachineSpecifications/MachineSpecifications/MachineSpecifications.csproj
  23. 4
      src/AddIns/Analysis/MachineSpecifications/MachineSpecifications/packages.config
  24. 25
      src/AddIns/Analysis/MachineSpecifications/MachineSpecifications/src/BehaviorImportedTestMember.cs
  25. 43
      src/AddIns/Analysis/MachineSpecifications/MachineSpecifications/src/ClassFilterBuilder.cs
  26. 138
      src/AddIns/Analysis/MachineSpecifications/MachineSpecifications/src/MSpecApplication.cs
  27. 36
      src/AddIns/Analysis/MachineSpecifications/MachineSpecifications/src/MSpecTestDebugger.cs
  28. 117
      src/AddIns/Analysis/MachineSpecifications/MachineSpecifications/src/MSpecTestFramework.cs
  29. 137
      src/AddIns/Analysis/MachineSpecifications/MachineSpecifications/src/MSpecUnitTestMonitor.cs
  30. 36
      src/AddIns/Analysis/MachineSpecifications/MachineSpecifications/src/MspecTestRunner.cs
  31. 8
      src/AddIns/Analysis/UnitTesting/Src/AbstractRunTestCommand.cs
  32. 71
      src/AddIns/Analysis/UnitTesting/Src/BaseTestMember.cs
  33. 42
      src/AddIns/Analysis/UnitTesting/Src/BaseTestMethod.cs
  34. 3
      src/AddIns/Analysis/UnitTesting/Src/IRegisteredTestFrameworks.cs
  35. 47
      src/AddIns/Analysis/UnitTesting/Src/InnerClassEnumerator.cs
  36. 21
      src/AddIns/Analysis/UnitTesting/Src/NUnitTestFramework.cs
  37. 9
      src/AddIns/Analysis/UnitTesting/Src/RegisteredTestFrameworks.cs
  38. 6
      src/AddIns/Analysis/UnitTesting/Src/SelectedTests.cs
  39. 67
      src/AddIns/Analysis/UnitTesting/Src/TestClass.cs
  40. 3
      src/AddIns/Analysis/UnitTesting/Src/TestFramework.cs
  41. 19
      src/AddIns/Analysis/UnitTesting/Src/TestMember.cs
  42. 55
      src/AddIns/Analysis/UnitTesting/Src/TestMethodTreeNode.cs
  43. 42
      src/AddIns/Analysis/UnitTesting/Src/TestProject.cs
  44. 4
      src/AddIns/Analysis/UnitTesting/Src/UnitTestCommands.cs
  45. 8
      src/AddIns/Analysis/UnitTesting/Test/Frameworks/NUnitTestFrameworkIsTestClassTests.cs
  46. 294
      src/AddIns/Analysis/UnitTesting/Test/Frameworks/RegisteredTestFrameworksTestFixture.cs
  47. 10
      src/AddIns/Analysis/UnitTesting/Test/Project/BaseTestMethodTestFixture.cs
  48. 74
      src/AddIns/Analysis/UnitTesting/Test/Project/DoubleNestedTestClassWithBaseType.cs
  49. 8
      src/AddIns/Analysis/UnitTesting/Test/Project/DuplicateMethodNameTestFixture.cs
  50. 110
      src/AddIns/Analysis/UnitTesting/Test/Project/InnerClassInTestFixtureTests.cs
  51. 11
      src/AddIns/Analysis/UnitTesting/Test/Project/InnerClassMethodRenamedTestFixture.cs
  52. 3
      src/AddIns/Analysis/UnitTesting/Test/Project/InnerClassTestFixtureBase.cs
  53. 15
      src/AddIns/Analysis/UnitTesting/Test/Project/TestClassIsTestMethodUsesTestFrameworksTestFixture.cs
  54. 6
      src/AddIns/Analysis/UnitTesting/Test/Tree/ClassTestFixtureSelectedTestFixture.cs
  55. 2
      src/AddIns/Analysis/UnitTesting/Test/Tree/GoToSelectedBaseClassMethodTestFixture.cs
  56. 6
      src/AddIns/Analysis/UnitTesting/Test/Tree/MethodTestSelectedTestFixture.cs
  57. 8
      src/AddIns/Analysis/UnitTesting/Test/Tree/NoOwnerForSelectedTestsTestFixture.cs
  58. 6
      src/AddIns/Analysis/UnitTesting/Test/Tree/SelectedTestsTestFixture.cs
  59. 19
      src/AddIns/Analysis/UnitTesting/Test/UnitTesting.Tests.csproj
  60. 4
      src/AddIns/Analysis/UnitTesting/Test/Utils/MockNUnitTestFramework.cs
  61. 2
      src/AddIns/Analysis/UnitTesting/Test/Utils/MockProjectContent.cs
  62. 5
      src/AddIns/Analysis/UnitTesting/Test/Utils/MockTestFramework.cs
  63. 2
      src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/SelectedTestsWithTestMethodTestFixture.cs
  64. 13
      src/AddIns/Analysis/UnitTesting/UnitTesting.csproj
  65. 12
      src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/PythonTestFramework.cs
  66. 17
      src/AddIns/BackendBindings/Ruby/RubyBinding/Project/Src/RubyTestFramework.cs
  67. BIN
      src/Tools/Machine.Specifications/CommandLine.dll
  68. 54
      src/Tools/Machine.Specifications/License.txt
  69. BIN
      src/Tools/Machine.Specifications/Machine.Specifications.Reporting.dll
  70. BIN
      src/Tools/Machine.Specifications/Machine.Specifications.dll
  71. BIN
      src/Tools/Machine.Specifications/Spark.dll
  72. BIN
      src/Tools/Machine.Specifications/mspec-clr4.exe
  73. BIN
      src/Tools/Machine.Specifications/mspec-x86-clr4.exe
  74. BIN
      src/Tools/Machine.Specifications/mspec-x86.exe
  75. BIN
      src/Tools/Machine.Specifications/mspec.exe

264
SharpDevelop.Tests.sln

@ -161,6 +161,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CodeCoverage.Tests", "src\A @@ -161,6 +161,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CodeCoverage.Tests", "src\A
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TreeMaps", "src\AddIns\Analysis\CodeQuality\TreeMaps\TreeMaps.csproj", "{3ED2897F-1A8A-4106-89D2-4D342860D480}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MachineSpecifications", "src\AddIns\Analysis\MachineSpecifications\MachineSpecifications\MachineSpecifications.csproj", "{D1DA3B8F-7313-4BDA-8880-461C5F007751}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MachineSpecifications.Tests", "src\AddIns\Analysis\MachineSpecifications\MachineSpecifications.Tests\MachineSpecifications.Tests.csproj", "{172AE35D-2051-4977-AC13-0BF1B76374D5}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Display Bindings", "Display Bindings", "{11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}"
ProjectSection(SolutionItems) = postProject
EndProjectSection
@ -1474,145 +1478,179 @@ Global @@ -1474,145 +1478,179 @@ Global
{53DCA265-3C3C-42F9-B647-F72BA678122B}.Release|x86.ActiveCfg = Release|Any CPU
{53DCA265-3C3C-42F9-B647-F72BA678122B}.Release|Debug.Build.0 = Release|Any CPU
{53DCA265-3C3C-42F9-B647-F72BA678122B}.Release|Debug.ActiveCfg = Release|Any CPU
{D1DA3B8F-7313-4BDA-8880-461C5F007751}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D1DA3B8F-7313-4BDA-8880-461C5F007751}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D1DA3B8F-7313-4BDA-8880-461C5F007751}.Debug|Win32.Build.0 = Debug|Any CPU
{D1DA3B8F-7313-4BDA-8880-461C5F007751}.Debug|Win32.ActiveCfg = Debug|Any CPU
{D1DA3B8F-7313-4BDA-8880-461C5F007751}.Debug|x86.Build.0 = Debug|Any CPU
{D1DA3B8F-7313-4BDA-8880-461C5F007751}.Debug|x86.ActiveCfg = Debug|Any CPU
{D1DA3B8F-7313-4BDA-8880-461C5F007751}.Debug|Debug.Build.0 = Debug|Any CPU
{D1DA3B8F-7313-4BDA-8880-461C5F007751}.Debug|Debug.ActiveCfg = Debug|Any CPU
{D1DA3B8F-7313-4BDA-8880-461C5F007751}.Release|Any CPU.Build.0 = Release|Any CPU
{D1DA3B8F-7313-4BDA-8880-461C5F007751}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D1DA3B8F-7313-4BDA-8880-461C5F007751}.Release|Win32.Build.0 = Release|Any CPU
{D1DA3B8F-7313-4BDA-8880-461C5F007751}.Release|Win32.ActiveCfg = Release|Any CPU
{D1DA3B8F-7313-4BDA-8880-461C5F007751}.Release|x86.Build.0 = Release|Any CPU
{D1DA3B8F-7313-4BDA-8880-461C5F007751}.Release|x86.ActiveCfg = Release|Any CPU
{D1DA3B8F-7313-4BDA-8880-461C5F007751}.Release|Debug.Build.0 = Release|Any CPU
{D1DA3B8F-7313-4BDA-8880-461C5F007751}.Release|Debug.ActiveCfg = Release|Any CPU
{172AE35D-2051-4977-AC13-0BF1B76374D5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{172AE35D-2051-4977-AC13-0BF1B76374D5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{172AE35D-2051-4977-AC13-0BF1B76374D5}.Debug|Win32.Build.0 = Debug|Any CPU
{172AE35D-2051-4977-AC13-0BF1B76374D5}.Debug|Win32.ActiveCfg = Debug|Any CPU
{172AE35D-2051-4977-AC13-0BF1B76374D5}.Debug|x86.Build.0 = Debug|Any CPU
{172AE35D-2051-4977-AC13-0BF1B76374D5}.Debug|x86.ActiveCfg = Debug|Any CPU
{172AE35D-2051-4977-AC13-0BF1B76374D5}.Debug|Debug.Build.0 = Debug|Any CPU
{172AE35D-2051-4977-AC13-0BF1B76374D5}.Debug|Debug.ActiveCfg = Debug|Any CPU
{172AE35D-2051-4977-AC13-0BF1B76374D5}.Release|Any CPU.Build.0 = Release|Any CPU
{172AE35D-2051-4977-AC13-0BF1B76374D5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{172AE35D-2051-4977-AC13-0BF1B76374D5}.Release|Win32.Build.0 = Release|Any CPU
{172AE35D-2051-4977-AC13-0BF1B76374D5}.Release|Win32.ActiveCfg = Release|Any CPU
{172AE35D-2051-4977-AC13-0BF1B76374D5}.Release|x86.Build.0 = Release|Any CPU
{172AE35D-2051-4977-AC13-0BF1B76374D5}.Release|x86.ActiveCfg = Release|Any CPU
{172AE35D-2051-4977-AC13-0BF1B76374D5}.Release|Debug.Build.0 = Release|Any CPU
{172AE35D-2051-4977-AC13-0BF1B76374D5}.Release|Debug.ActiveCfg = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{1152B71B-3C05-4598-B20D-823B5D40559E} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01}
{8035765F-D51F-4A0C-A746-2FD100E19419} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01}
{2748AD25-9C63-4E12-877B-4DCE96FBED54} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01}
{80318B5F-A25D-45AB-8A95-EF31D2370A4C} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01}
{924EE450-603D-49C1-A8E5-4AFAA31CE6F3} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01}
{857CA1A3-FC88-4BE0-AB6A-D1EE772AB288} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01}
{7E4A7172-7FF5-48D0-B719-7CD959DD1AC9} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01}
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01}
{AD6FAA08-D6F5-4DBA-AF85-F4DA9F40C3B5} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01}
{4980B743-B32F-4aba-AABD-45E2CAD3568D} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01}
{7DB80259-24D4-46C3-A024-53FF1987733D} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01}
{C3CBC8E3-81D8-4C5B-9941-DCCD12D50B1F} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01}
{B5F54272-49F0-40DB-845A-8D837875D3BA} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01}
{DDE2A481-8271-4EAC-A330-8FA6A38D13D1} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C}
{4139CCF6-FB49-4A9D-B2CF-331E9EA3198D} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C}
{6C55B776-26D4-4DB3-A6AB-87E783B2F3D1} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C}
{2FF700C2-A38A-48BD-A637-8CAFD4FE6237} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C}
{E5A0F4D8-37FD-4A30-BEB0-4409DC4E0865} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C}
{6222A3A1-83CE-47A3-A4E4-A018F82D44D8} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C}
{C3CBC8E3-81D8-4C5B-9941-DCCD12D50B1F} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01}
{7DB80259-24D4-46C3-A024-53FF1987733D} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01}
{4980B743-B32F-4aba-AABD-45E2CAD3568D} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01}
{AD6FAA08-D6F5-4DBA-AF85-F4DA9F40C3B5} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01}
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01}
{7E4A7172-7FF5-48D0-B719-7CD959DD1AC9} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01}
{857CA1A3-FC88-4BE0-AB6A-D1EE772AB288} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01}
{924EE450-603D-49C1-A8E5-4AFAA31CE6F3} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01}
{80318B5F-A25D-45AB-8A95-EF31D2370A4C} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01}
{2748AD25-9C63-4E12-877B-4DCE96FBED54} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01}
{8035765F-D51F-4A0C-A746-2FD100E19419} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01}
{1152B71B-3C05-4598-B20D-823B5D40559E} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01}
{D68133BD-1E63-496E-9EDE-4FBDBF77B486} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C}
{3A9AE6AA-BC07-4A2F-972C-581E3AE2F195} = {E5A0F4D8-37FD-4A30-BEB0-4409DC4E0865}
{B22522AA-B5BF-4A58-AC6D-D4B45805521F} = {E5A0F4D8-37FD-4A30-BEB0-4409DC4E0865}
{6222A3A1-83CE-47A3-A4E4-A018F82D44D8} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C}
{E5A0F4D8-37FD-4A30-BEB0-4409DC4E0865} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C}
{2FF700C2-A38A-48BD-A637-8CAFD4FE6237} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C}
{6C55B776-26D4-4DB3-A6AB-87E783B2F3D1} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C}
{4139CCF6-FB49-4A9D-B2CF-331E9EA3198D} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C}
{DDE2A481-8271-4EAC-A330-8FA6A38D13D1} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C}
{870115DD-960A-4406-A6B9-600BCDC36A03} = {E5A0F4D8-37FD-4A30-BEB0-4409DC4E0865}
{F355E45F-F54F-4B42-8916-9A633A392789} = {39327899-ED91-4F7F-988C-4FE4E17C014D}
{11BF9245-88A3-4A0A-9A8A-EC9D98036B0F} = {39327899-ED91-4F7F-988C-4FE4E17C014D}
{F3662720-9EA2-4591-BBC6-97361DCE50A9} = {39327899-ED91-4F7F-988C-4FE4E17C014D}
{CDE0C5A4-2096-48B5-BEA3-74DBA0F0E1EF} = {39327899-ED91-4F7F-988C-4FE4E17C014D}
{E0646C25-36F2-4524-969F-FA621353AB94} = {39327899-ED91-4F7F-988C-4FE4E17C014D}
{C4035C32-026F-4158-AF15-113EA1EF1960} = {39327899-ED91-4F7F-988C-4FE4E17C014D}
{8789D7FF-B36C-4187-B57D-55ED64623272} = {39327899-ED91-4F7F-988C-4FE4E17C014D}
{B22522AA-B5BF-4A58-AC6D-D4B45805521F} = {E5A0F4D8-37FD-4A30-BEB0-4409DC4E0865}
{3A9AE6AA-BC07-4A2F-972C-581E3AE2F195} = {E5A0F4D8-37FD-4A30-BEB0-4409DC4E0865}
{F208FF4F-E5D8-41D5-A7C7-B463976F156E} = {39327899-ED91-4F7F-988C-4FE4E17C014D}
{76DD1CC0-0D86-44A1-9BD6-D91F79807BC3} = {F355E45F-F54F-4B42-8916-9A633A392789}
{44A8DE09-CAB9-49D8-9CFC-5EB0A552F181} = {F355E45F-F54F-4B42-8916-9A633A392789}
{CE498514-D12D-4B6E-AE0E-FEC29BD43748} = {F355E45F-F54F-4B42-8916-9A633A392789}
{08CE9972-283B-44F4-82FA-966F7DFA6B7A} = {F355E45F-F54F-4B42-8916-9A633A392789}
{3EAA45A9-735C-4AC7-A799-947B93EA449D} = {F355E45F-F54F-4B42-8916-9A633A392789}
{1F261725-6318-4434-A1B1-6C70CE4CD324} = {F355E45F-F54F-4B42-8916-9A633A392789}
{A5C0E8F8-9D04-46ED-91D6-1DEF1575313B} = {F355E45F-F54F-4B42-8916-9A633A392789}
{8789D7FF-B36C-4187-B57D-55ED64623272} = {39327899-ED91-4F7F-988C-4FE4E17C014D}
{C4035C32-026F-4158-AF15-113EA1EF1960} = {39327899-ED91-4F7F-988C-4FE4E17C014D}
{E0646C25-36F2-4524-969F-FA621353AB94} = {39327899-ED91-4F7F-988C-4FE4E17C014D}
{CDE0C5A4-2096-48B5-BEA3-74DBA0F0E1EF} = {39327899-ED91-4F7F-988C-4FE4E17C014D}
{F3662720-9EA2-4591-BBC6-97361DCE50A9} = {39327899-ED91-4F7F-988C-4FE4E17C014D}
{11BF9245-88A3-4A0A-9A8A-EC9D98036B0F} = {39327899-ED91-4F7F-988C-4FE4E17C014D}
{F355E45F-F54F-4B42-8916-9A633A392789} = {39327899-ED91-4F7F-988C-4FE4E17C014D}
{172AE35D-2051-4977-AC13-0BF1B76374D5} = {F355E45F-F54F-4B42-8916-9A633A392789}
{D1DA3B8F-7313-4BDA-8880-461C5F007751} = {F355E45F-F54F-4B42-8916-9A633A392789}
{3ED2897F-1A8A-4106-89D2-4D342860D480} = {F355E45F-F54F-4B42-8916-9A633A392789}
{6022AC51-B658-4C54-97EF-79187AC65B47} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}
{FC0FE702-A87D-4D70-A9B6-1ECCD611125F} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}
{0773ED53-08E2-4495-A3BE-CA0B5D413C15} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}
{E618A9CD-A39F-4925-A538-E8A3FEF24E54} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}
{CBC6C247-747B-4908-B09A-4D2E0F640B6B} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}
{0162E499-42D0-409B-AA25-EED21F75336B} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}
{DCA2703D-250A-463E-A68A-07ED105AE6BD} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}
{7D7E92DF-ACEB-4B69-92C8-8AC7A703CD57} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}
{BFA3BF26-33BD-4A65-B84D-C7F30D131668} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}
{C7F29FC2-1B03-4CDD-9E30-400F4765FF04} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}
{85226AFB-CE71-4851-9A75-7EEC663A8E8A} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}
{A5C0E8F8-9D04-46ED-91D6-1DEF1575313B} = {F355E45F-F54F-4B42-8916-9A633A392789}
{1F261725-6318-4434-A1B1-6C70CE4CD324} = {F355E45F-F54F-4B42-8916-9A633A392789}
{3EAA45A9-735C-4AC7-A799-947B93EA449D} = {F355E45F-F54F-4B42-8916-9A633A392789}
{08CE9972-283B-44F4-82FA-966F7DFA6B7A} = {F355E45F-F54F-4B42-8916-9A633A392789}
{CE498514-D12D-4B6E-AE0E-FEC29BD43748} = {F355E45F-F54F-4B42-8916-9A633A392789}
{44A8DE09-CAB9-49D8-9CFC-5EB0A552F181} = {F355E45F-F54F-4B42-8916-9A633A392789}
{76DD1CC0-0D86-44A1-9BD6-D91F79807BC3} = {F355E45F-F54F-4B42-8916-9A633A392789}
{AD8272AC-5C9E-4061-90FB-CEF15A9A3F41} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}
{88DA149F-21B2-48AB-82C4-28FB6BDFD783} = {6022AC51-B658-4C54-97EF-79187AC65B47}
{943DBBB3-E84E-4CF4-917C-C05AFA8743C1} = {6022AC51-B658-4C54-97EF-79187AC65B47}
{78CC29AC-CC79-4355-B1F2-97936DF198AC} = {6022AC51-B658-4C54-97EF-79187AC65B47}
{9A9D6FD4-6A2E-455D-ACC3-DDA775FE9865} = {6022AC51-B658-4C54-97EF-79187AC65B47}
{85226AFB-CE71-4851-9A75-7EEC663A8E8A} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}
{C7F29FC2-1B03-4CDD-9E30-400F4765FF04} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}
{BFA3BF26-33BD-4A65-B84D-C7F30D131668} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}
{7D7E92DF-ACEB-4B69-92C8-8AC7A703CD57} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}
{DCA2703D-250A-463E-A68A-07ED105AE6BD} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}
{0162E499-42D0-409B-AA25-EED21F75336B} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}
{CBC6C247-747B-4908-B09A-4D2E0F640B6B} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}
{E618A9CD-A39F-4925-A538-E8A3FEF24E54} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}
{0773ED53-08E2-4495-A3BE-CA0B5D413C15} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}
{FC0FE702-A87D-4D70-A9B6-1ECCD611125F} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}
{6022AC51-B658-4C54-97EF-79187AC65B47} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}
{66A378A1-E9F4-4AD5-8946-D0EC06C2902F} = {6022AC51-B658-4C54-97EF-79187AC65B47}
{DFB936AD-90EE-4B4F-941E-4F4A636F0D92} = {0773ED53-08E2-4495-A3BE-CA0B5D413C15}
{9A9D6FD4-6A2E-455D-ACC3-DDA775FE9865} = {6022AC51-B658-4C54-97EF-79187AC65B47}
{78CC29AC-CC79-4355-B1F2-97936DF198AC} = {6022AC51-B658-4C54-97EF-79187AC65B47}
{943DBBB3-E84E-4CF4-917C-C05AFA8743C1} = {6022AC51-B658-4C54-97EF-79187AC65B47}
{88DA149F-21B2-48AB-82C4-28FB6BDFD783} = {6022AC51-B658-4C54-97EF-79187AC65B47}
{DC1CCE11-CB91-40FA-9C47-4D9EB5D67BFD} = {0773ED53-08E2-4495-A3BE-CA0B5D413C15}
{08F772A1-F0BE-433E-8B37-F6522953DB05} = {BFA3BF26-33BD-4A65-B84D-C7F30D131668}
{5A1354DF-4989-4BB4-BC6B-D627C2E9FA13} = {BFA3BF26-33BD-4A65-B84D-C7F30D131668}
{DFB936AD-90EE-4B4F-941E-4F4A636F0D92} = {0773ED53-08E2-4495-A3BE-CA0B5D413C15}
{0991423A-DBF6-4C89-B365-A1DF1EB32E42} = {BFA3BF26-33BD-4A65-B84D-C7F30D131668}
{A9F12710-24E4-46D4-832C-6ECB395B9EAD} = {C7F29FC2-1B03-4CDD-9E30-400F4765FF04}
{B7823AE9-4B43-4859-8796-2EBDC116FBB8} = {C7F29FC2-1B03-4CDD-9E30-400F4765FF04}
{BAD94D6E-4159-4CB6-B991-486F412D9BB6} = {C7F29FC2-1B03-4CDD-9E30-400F4765FF04}
{5C70D6AB-0A33-43F9-B8B5-54558C35BBB1} = {C7F29FC2-1B03-4CDD-9E30-400F4765FF04}
{EEF5E054-4192-4A57-8FBF-E860D808A51D} = {C7F29FC2-1B03-4CDD-9E30-400F4765FF04}
{5A1354DF-4989-4BB4-BC6B-D627C2E9FA13} = {BFA3BF26-33BD-4A65-B84D-C7F30D131668}
{08F772A1-F0BE-433E-8B37-F6522953DB05} = {BFA3BF26-33BD-4A65-B84D-C7F30D131668}
{AFE34868-AFA1-4E1C-9450-47AB4BE329D5} = {C7F29FC2-1B03-4CDD-9E30-400F4765FF04}
{8AA421C8-D7AF-4957-9F43-5135328ACB24} = {AD8272AC-5C9E-4061-90FB-CEF15A9A3F41}
{984CC812-9470-4A13-AFF9-CC44068D666C} = {AD8272AC-5C9E-4061-90FB-CEF15A9A3F41}
{3B2A5653-EC97-4001-BB9B-D90F1AF2C371} = {AD8272AC-5C9E-4061-90FB-CEF15A9A3F41}
{EEF5E054-4192-4A57-8FBF-E860D808A51D} = {C7F29FC2-1B03-4CDD-9E30-400F4765FF04}
{5C70D6AB-0A33-43F9-B8B5-54558C35BBB1} = {C7F29FC2-1B03-4CDD-9E30-400F4765FF04}
{BAD94D6E-4159-4CB6-B991-486F412D9BB6} = {C7F29FC2-1B03-4CDD-9E30-400F4765FF04}
{B7823AE9-4B43-4859-8796-2EBDC116FBB8} = {C7F29FC2-1B03-4CDD-9E30-400F4765FF04}
{A9F12710-24E4-46D4-832C-6ECB395B9EAD} = {C7F29FC2-1B03-4CDD-9E30-400F4765FF04}
{53DCA265-3C3C-42F9-B647-F72BA678122B} = {AD8272AC-5C9E-4061-90FB-CEF15A9A3F41}
{C6410CCE-C29F-4BF4-94BF-545DE1CBB144} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
{DEFC8584-BEC3-4921-BD0F-40482E450B7B} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
{A569DCC1-C608-45FD-B770-4F79335EF154} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
{DD9AE6A5-2B9D-443A-BC71-38BE578C36BD} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
{461606BD-E824-4D0A-8CBA-01810B1F5E02} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
{64A3E5E6-90BF-47F6-94DF-68C94B62C817} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
{5EEB99CF-EA2B-4733-80A6-CE9192D68170} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
{D022A6CE-7438-41E8-AC64-F2DE18EC54C6} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
{4B8F0F98-8BE1-402B-AA8B-C8D548577B38} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
{F93E52FD-DA66-4CE5-A0CB-BCD902811122} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
{7D5C266F-D6FF-4D14-B315-0C0FC6C4EF51} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
{9196DD8A-B4D4-4780-8742-C5762E547FC2} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
{3CA90546-3B4C-4663-9445-C4E9371750A7} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
{A4AA51DE-A096-47EC-AA5D-D91457834ECF} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
{80F76D10-0B44-4D55-B4BD-DAEB5464090C} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
{B5D8C3E6-42EC-4D4B-AD05-3644B32563EF} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
{3B2A5653-EC97-4001-BB9B-D90F1AF2C371} = {AD8272AC-5C9E-4061-90FB-CEF15A9A3F41}
{984CC812-9470-4A13-AFF9-CC44068D666C} = {AD8272AC-5C9E-4061-90FB-CEF15A9A3F41}
{8AA421C8-D7AF-4957-9F43-5135328ACB24} = {AD8272AC-5C9E-4061-90FB-CEF15A9A3F41}
{5186325C-DD7F-4246-9BE7-3F384EFBF5A6} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
{A406803B-C584-43A3-BCEE-A0BB3132CB5F} = {C6410CCE-C29F-4BF4-94BF-545DE1CBB144}
{11115C83-3DB1-431F-8B98-59040359238D} = {C6410CCE-C29F-4BF4-94BF-545DE1CBB144}
{E0A5E80A-003B-4335-A9DC-A76E2E46D38D} = {C6410CCE-C29F-4BF4-94BF-545DE1CBB144}
{56E98A01-8398-4A08-9578-C7337711A52B} = {C6410CCE-C29F-4BF4-94BF-545DE1CBB144}
{B5D8C3E6-42EC-4D4B-AD05-3644B32563EF} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
{80F76D10-0B44-4D55-B4BD-DAEB5464090C} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
{A4AA51DE-A096-47EC-AA5D-D91457834ECF} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
{3CA90546-3B4C-4663-9445-C4E9371750A7} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
{9196DD8A-B4D4-4780-8742-C5762E547FC2} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
{7D5C266F-D6FF-4D14-B315-0C0FC6C4EF51} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
{F93E52FD-DA66-4CE5-A0CB-BCD902811122} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
{4B8F0F98-8BE1-402B-AA8B-C8D548577B38} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
{D022A6CE-7438-41E8-AC64-F2DE18EC54C6} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
{5EEB99CF-EA2B-4733-80A6-CE9192D68170} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
{64A3E5E6-90BF-47F6-94DF-68C94B62C817} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
{461606BD-E824-4D0A-8CBA-01810B1F5E02} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
{DD9AE6A5-2B9D-443A-BC71-38BE578C36BD} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
{A569DCC1-C608-45FD-B770-4F79335EF154} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
{DEFC8584-BEC3-4921-BD0F-40482E450B7B} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
{C6410CCE-C29F-4BF4-94BF-545DE1CBB144} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
{AE4AB0FA-6087-4480-AF37-0FA1452B3DA1} = {C6410CCE-C29F-4BF4-94BF-545DE1CBB144}
{0008FCE9-9EB4-4E2E-979B-553278E5BBA6} = {DEFC8584-BEC3-4921-BD0F-40482E450B7B}
{56E98A01-8398-4A08-9578-C7337711A52B} = {C6410CCE-C29F-4BF4-94BF-545DE1CBB144}
{E0A5E80A-003B-4335-A9DC-A76E2E46D38D} = {C6410CCE-C29F-4BF4-94BF-545DE1CBB144}
{11115C83-3DB1-431F-8B98-59040359238D} = {C6410CCE-C29F-4BF4-94BF-545DE1CBB144}
{A406803B-C584-43A3-BCEE-A0BB3132CB5F} = {C6410CCE-C29F-4BF4-94BF-545DE1CBB144}
{6B1CFE35-DA17-4DEB-9C6E-227E5E251DA0} = {DEFC8584-BEC3-4921-BD0F-40482E450B7B}
{EC06F96A-AEEC-49D6-B03D-AB87C6EB674C} = {CDE0C5A4-2096-48B5-BEA3-74DBA0F0E1EF}
{1D18D788-F7EE-4585-A23B-34DC8EC63CB8} = {CDE0C5A4-2096-48B5-BEA3-74DBA0F0E1EF}
{0008FCE9-9EB4-4E2E-979B-553278E5BBA6} = {DEFC8584-BEC3-4921-BD0F-40482E450B7B}
{A4C858C8-51B6-4265-A695-A20FCEBA1D19} = {CDE0C5A4-2096-48B5-BEA3-74DBA0F0E1EF}
{85C09AD8-183B-403A-869A-7226646218A9} = {E0646C25-36F2-4524-969F-FA621353AB94}
{7048AE18-EB93-4A84-82D0-DD60EB58ADBD} = {E0646C25-36F2-4524-969F-FA621353AB94}
{E954F3CB-A446-492F-A664-2B376EBC86E8} = {E0646C25-36F2-4524-969F-FA621353AB94}
{388E7B64-0393-4EB4-A3E3-5C474F141853} = {E0646C25-36F2-4524-969F-FA621353AB94}
{F390DA70-1FE1-4715-81A0-389AB010C130} = {E0646C25-36F2-4524-969F-FA621353AB94}
{7C96B65D-28A5-4F28-A35B-8D83CE831EE8} = {E0646C25-36F2-4524-969F-FA621353AB94}
{BF38FB72-B380-4196-AF8C-95749D726C61} = {E0646C25-36F2-4524-969F-FA621353AB94}
{1F1AC7CD-D154-45BB-8EAF-804CA8055F5A} = {E0646C25-36F2-4524-969F-FA621353AB94}
{E1B288A2-08EE-4318-8BBB-8AB72C69E33E} = {E0646C25-36F2-4524-969F-FA621353AB94}
{CA76F702-5B4E-4918-B8D8-7FF8382434FF} = {E0646C25-36F2-4524-969F-FA621353AB94}
{97B3B514-AB0E-4FE1-89DE-8A945F5112AE} = {E0646C25-36F2-4524-969F-FA621353AB94}
{50A89267-A28B-4DF3-8E62-912E005143B8} = {E0646C25-36F2-4524-969F-FA621353AB94}
{52006F3F-3156-45DE-89D8-C4813694FBA4} = {E0646C25-36F2-4524-969F-FA621353AB94}
{70966F84-74C9-4067-A379-0C674A929233} = {E0646C25-36F2-4524-969F-FA621353AB94}
{1D18D788-F7EE-4585-A23B-34DC8EC63CB8} = {CDE0C5A4-2096-48B5-BEA3-74DBA0F0E1EF}
{EC06F96A-AEEC-49D6-B03D-AB87C6EB674C} = {CDE0C5A4-2096-48B5-BEA3-74DBA0F0E1EF}
{C7288E72-FFBE-48CD-84B4-6CBF95A7195A} = {E0646C25-36F2-4524-969F-FA621353AB94}
{8D732610-8FC6-43BA-94C9-7126FD7FE361} = {CA76F702-5B4E-4918-B8D8-7FF8382434FF}
{D332F2D1-2CF1-43B7-903C-844BD5211A7E} = {CA76F702-5B4E-4918-B8D8-7FF8382434FF}
{833904AB-3CD4-4071-9B48-5770E44685AA} = {CA76F702-5B4E-4918-B8D8-7FF8382434FF}
{70966F84-74C9-4067-A379-0C674A929233} = {E0646C25-36F2-4524-969F-FA621353AB94}
{52006F3F-3156-45DE-89D8-C4813694FBA4} = {E0646C25-36F2-4524-969F-FA621353AB94}
{50A89267-A28B-4DF3-8E62-912E005143B8} = {E0646C25-36F2-4524-969F-FA621353AB94}
{97B3B514-AB0E-4FE1-89DE-8A945F5112AE} = {E0646C25-36F2-4524-969F-FA621353AB94}
{CA76F702-5B4E-4918-B8D8-7FF8382434FF} = {E0646C25-36F2-4524-969F-FA621353AB94}
{E1B288A2-08EE-4318-8BBB-8AB72C69E33E} = {E0646C25-36F2-4524-969F-FA621353AB94}
{1F1AC7CD-D154-45BB-8EAF-804CA8055F5A} = {E0646C25-36F2-4524-969F-FA621353AB94}
{BF38FB72-B380-4196-AF8C-95749D726C61} = {E0646C25-36F2-4524-969F-FA621353AB94}
{7C96B65D-28A5-4F28-A35B-8D83CE831EE8} = {E0646C25-36F2-4524-969F-FA621353AB94}
{F390DA70-1FE1-4715-81A0-389AB010C130} = {E0646C25-36F2-4524-969F-FA621353AB94}
{388E7B64-0393-4EB4-A3E3-5C474F141853} = {E0646C25-36F2-4524-969F-FA621353AB94}
{E954F3CB-A446-492F-A664-2B376EBC86E8} = {E0646C25-36F2-4524-969F-FA621353AB94}
{7048AE18-EB93-4A84-82D0-DD60EB58ADBD} = {E0646C25-36F2-4524-969F-FA621353AB94}
{85C09AD8-183B-403A-869A-7226646218A9} = {E0646C25-36F2-4524-969F-FA621353AB94}
{23B517C9-1ECC-4419-A13F-0B7136D085CB} = {CA76F702-5B4E-4918-B8D8-7FF8382434FF}
{C9DE556D-325C-4544-B29F-16A9EB7C9830} = {97B3B514-AB0E-4FE1-89DE-8A945F5112AE}
{DBCF20A1-BA13-4582-BFA9-74DE4D987B73} = {97B3B514-AB0E-4FE1-89DE-8A945F5112AE}
{4AC2D5F1-F671-480C-A075-6BF62B3721B2} = {97B3B514-AB0E-4FE1-89DE-8A945F5112AE}
{833904AB-3CD4-4071-9B48-5770E44685AA} = {CA76F702-5B4E-4918-B8D8-7FF8382434FF}
{D332F2D1-2CF1-43B7-903C-844BD5211A7E} = {CA76F702-5B4E-4918-B8D8-7FF8382434FF}
{8D732610-8FC6-43BA-94C9-7126FD7FE361} = {CA76F702-5B4E-4918-B8D8-7FF8382434FF}
{6FA16499-896F-4C02-BB43-1AF5C6C7C713} = {97B3B514-AB0E-4FE1-89DE-8A945F5112AE}
{C896FFFF-5B6C-4B0E-B6DF-049865F501B4} = {C7288E72-FFBE-48CD-84B4-6CBF95A7195A}
{4AC2D5F1-F671-480C-A075-6BF62B3721B2} = {97B3B514-AB0E-4FE1-89DE-8A945F5112AE}
{DBCF20A1-BA13-4582-BFA9-74DE4D987B73} = {97B3B514-AB0E-4FE1-89DE-8A945F5112AE}
{C9DE556D-325C-4544-B29F-16A9EB7C9830} = {97B3B514-AB0E-4FE1-89DE-8A945F5112AE}
{01DF0475-0CB2-4E81-971B-BADC60CDE3A5} = {C7288E72-FFBE-48CD-84B4-6CBF95A7195A}
{068F9531-5D29-49E0-980E-59982A3A0469} = {C4035C32-026F-4158-AF15-113EA1EF1960}
{FE88FE17-D9FB-4FCC-9A35-6BFFB6B26CC6} = {C4035C32-026F-4158-AF15-113EA1EF1960}
{72FFB35A-C9E2-4A31-B4FA-E3E3E28DED5F} = {C4035C32-026F-4158-AF15-113EA1EF1960}
{BDA49550-5ED1-4C6B-B648-657B2CACD8E0} = {C4035C32-026F-4158-AF15-113EA1EF1960}
{C896FFFF-5B6C-4B0E-B6DF-049865F501B4} = {C7288E72-FFBE-48CD-84B4-6CBF95A7195A}
{D294A12D-4B38-4F25-9AA6-3D4A6CE26E7B} = {C4035C32-026F-4158-AF15-113EA1EF1960}
{D81F5C91-D7DB-46E5-BC99-49488FB6814C} = {8789D7FF-B36C-4187-B57D-55ED64623272}
{4B2239FF-8FD6-431D-9D22-1B8049BA6917} = {8789D7FF-B36C-4187-B57D-55ED64623272}
{E16B73CA-3603-47EE-915E-6F8B2A07304B} = {8789D7FF-B36C-4187-B57D-55ED64623272}
{35D002D7-C78B-44FB-92AA-104BEB431678} = {8789D7FF-B36C-4187-B57D-55ED64623272}
{BDA49550-5ED1-4C6B-B648-657B2CACD8E0} = {C4035C32-026F-4158-AF15-113EA1EF1960}
{72FFB35A-C9E2-4A31-B4FA-E3E3E28DED5F} = {C4035C32-026F-4158-AF15-113EA1EF1960}
{FE88FE17-D9FB-4FCC-9A35-6BFFB6B26CC6} = {C4035C32-026F-4158-AF15-113EA1EF1960}
{068F9531-5D29-49E0-980E-59982A3A0469} = {C4035C32-026F-4158-AF15-113EA1EF1960}
{2B232C7E-CFB6-4B73-A1B8-134A8A2ED4F7} = {8789D7FF-B36C-4187-B57D-55ED64623272}
{17F4D7E0-6933-4C2E-8714-FD7E98D625D5} = {F208FF4F-E5D8-41D5-A7C7-B463976F156E}
{35D002D7-C78B-44FB-92AA-104BEB431678} = {8789D7FF-B36C-4187-B57D-55ED64623272}
{E16B73CA-3603-47EE-915E-6F8B2A07304B} = {8789D7FF-B36C-4187-B57D-55ED64623272}
{4B2239FF-8FD6-431D-9D22-1B8049BA6917} = {8789D7FF-B36C-4187-B57D-55ED64623272}
{D81F5C91-D7DB-46E5-BC99-49488FB6814C} = {8789D7FF-B36C-4187-B57D-55ED64623272}
{83F15BA7-8478-4664-81BB-A82F146D88B3} = {F208FF4F-E5D8-41D5-A7C7-B463976F156E}
{17F4D7E0-6933-4C2E-8714-FD7E98D625D5} = {F208FF4F-E5D8-41D5-A7C7-B463976F156E}
EndGlobalSection
EndGlobal

56
src/AddIns/Analysis/MachineSpecifications/Libraries/Machine.Fakes/License.txt

@ -0,0 +1,56 @@ @@ -0,0 +1,56 @@
Copyright (c) 2011 Machine.Fakes Project
Portions Copyright (c) 2011 Bjoern Rochel, Steffen Forkmann
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*****************************
Some parts licensed under MS-PL
*****************************
This license governs use of the accompanying software. If you use the software, you accept this license. If you do not accept the license, do not use the software.
1. Definitions
The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning here as under U.S. copyright law.
A "contribution" is the original software, or any additions or changes to the software.
A "contributor" is any person that distributes its contribution under this license.
"Licensed patents" are a contributor's patent claims that read directly on its contribution.
2. Grant of Rights
(A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or any derivative works that you create.
(B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution in the software or derivative works of the contribution in the software.
3. Conditions and Limitations
(A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks.
(B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your patent license from such contributor to the software ends automatically.
(C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution notices that are present in the software.
(D) If you distribute any portion of the software in source code form, you may do so only under this license by including a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license.
(E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a particular purpose and non-infringement.

BIN
src/AddIns/Analysis/MachineSpecifications/Libraries/Machine.Fakes/Machine.Fakes.Adapters.RhinoMocks.dll

Binary file not shown.

BIN
src/AddIns/Analysis/MachineSpecifications/Libraries/Machine.Fakes/Machine.Fakes.dll

Binary file not shown.

BIN
src/AddIns/Analysis/MachineSpecifications/Libraries/RhinoMocks.3.6/Rhino.Mocks.dll

Binary file not shown.

2
src/AddIns/Analysis/MachineSpecifications/Libraries/RhinoMocks.3.6/acknowledgements.txt

@ -0,0 +1,2 @@ @@ -0,0 +1,2 @@
Rhino Mocks is using Castle Dynamic Proxy (http://www.castleproject.org/dynamicproxy/index.html) to handle proxying the types it needs to mock.
The Dynamic Proxy project has been invaluable resource and made creating Rhino Mocks possible.

25
src/AddIns/Analysis/MachineSpecifications/Libraries/RhinoMocks.3.6/license.txt

@ -0,0 +1,25 @@ @@ -0,0 +1,25 @@
Copyright (c) 2005 - 2009 Ayende Rahien (ayende@ayende.com)
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of Ayende Rahien nor the names of its
contributors may be used to endorse or promote products derived from this
software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

53
src/AddIns/Analysis/MachineSpecifications/Libraries/developwithpassion.specifications.rhinomocks.0.4.13.0/License.txt

@ -0,0 +1,53 @@ @@ -0,0 +1,53 @@
Copyright (c) 2011 Develop With Passion®
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*****************************
Some parts licensed under MS-PL
*****************************
This license governs use of the accompanying software. If you use the software, you accept this license. If you do not accept the license, do not use the software.
1. Definitions
The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning here as under U.S. copyright law.
A "contribution" is the original software, or any additions or changes to the software.
A "contributor" is any person that distributes its contribution under this license.
"Licensed patents" are a contributor's patent claims that read directly on its contribution.
2. Grant of Rights
(A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or any derivative works that you create.
(B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution in the software or derivative works of the contribution in the software.
3. Conditions and Limitations
(A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks.
(B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your patent license from such contributor to the software ends automatically.
(C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution notices that are present in the software.
(D) If you distribute any portion of the software in source code form, you may do so only under this license by including a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license.
(E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a particular purpose and non-infringement.

BIN
src/AddIns/Analysis/MachineSpecifications/Libraries/developwithpassion.specifications.rhinomocks.0.4.13.0/developwithpassion.specifications.dll

Binary file not shown.

BIN
src/AddIns/Analysis/MachineSpecifications/Libraries/developwithpassion.specifications.rhinomocks.0.4.13.0/developwithpassion.specifications.rhinomocks.dll

Binary file not shown.

21
src/AddIns/Analysis/MachineSpecifications/MachineSpecifications.Tests/Data/MSpecUnitTestMonitorTestsSampleData.xml

@ -0,0 +1,21 @@ @@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<MSpec>
<run time="115" />
<assembly name="MSpecTest1" location="C:\Users\trecio\Documents\SharpDevelop Projects\MSpecTest\MSpecTest1\bin\Debug\MSpecTest1.dll" time="52">
<concern name="">
<context name="TestClass" type-name="Namespace.TestClass">
<specification name="PassedTest" field-name="Passed_Test" status="passed" />
<specification name="FailedTest" field-name="Failed_Test" status="failed">
<error>
<message>
<![CDATA[Test failure description.]]>
</message>
<stack-trace><![CDATA[Stack trace]]></stack-trace>
</error>
</specification>
<specification name="NotImplementedTest" field-name="Not_Implemented_Test" status="not-implemented" />
<specification name="IgnoredTest" field-name="Ignored_Test" status="ignored" />
</context>
</concern>
</assembly>
</MSpec>

96
src/AddIns/Analysis/MachineSpecifications/MachineSpecifications.Tests/MachineSpecifications.Tests.csproj

@ -0,0 +1,96 @@ @@ -0,0 +1,96 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build">
<PropertyGroup>
<ProjectGuid>{172AE35D-2051-4977-AC13-0BF1B76374D5}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<OutputType>Library</OutputType>
<RootNamespace>ICSharpCode.MachineSpecifications.Tests</RootNamespace>
<AssemblyName>MachineSpecifications.Tests</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkProfile>
</TargetFrameworkProfile>
<AppDesignerFolder>Properties</AppDesignerFolder>
<PlatformTarget>AnyCPU</PlatformTarget>
<OutputPath>..\..\..\..\..\bin\UnitTests\</OutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<DebugSymbols>True</DebugSymbols>
<DebugType>Full</DebugType>
<Optimize>False</Optimize>
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
<DefineConstants>DEBUG;TRACE</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<DebugSymbols>False</DebugSymbols>
<DebugType>None</DebugType>
<Optimize>True</Optimize>
<CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
<DefineConstants>TRACE</DefineConstants>
</PropertyGroup>
<ItemGroup>
<Reference Include="developwithpassion.specifications">
<HintPath>..\Libraries\developwithpassion.specifications.rhinomocks.0.4.13.0\developwithpassion.specifications.dll</HintPath>
</Reference>
<Reference Include="developwithpassion.specifications.rhinomocks">
<HintPath>..\Libraries\developwithpassion.specifications.rhinomocks.0.4.13.0\developwithpassion.specifications.rhinomocks.dll</HintPath>
</Reference>
<Reference Include="Machine.Fakes">
<HintPath>..\Libraries\Machine.Fakes\Machine.Fakes.dll</HintPath>
</Reference>
<Reference Include="Machine.Fakes.Adapters.RhinoMocks">
<HintPath>..\Libraries\Machine.Fakes\Machine.Fakes.Adapters.RhinoMocks.dll</HintPath>
</Reference>
<Reference Include="Machine.Specifications">
<HintPath>..\..\..\..\Tools\Machine.Specifications\Machine.Specifications.dll</HintPath>
</Reference>
<Reference Include="Rhino.Mocks">
<HintPath>..\Libraries\RhinoMocks.3.6\Rhino.Mocks.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Xml" />
<Reference Include="System.Xml.Linq">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Src\ClassFilterBuilder.cs" />
<Compile Include="Src\MSpecTestFrameworkTests.cs" />
<Compile Include="Src\MSpecUnitTestMonitorTests.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="Data\MSpecUnitTestMonitorTestsSampleData.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\..\Main\Base\Project\ICSharpCode.SharpDevelop.csproj">
<Project>{2748AD25-9C63-4E12-877B-4DCE96FBED54}</Project>
<Name>ICSharpCode.SharpDevelop</Name>
</ProjectReference>
<ProjectReference Include="..\..\..\..\Main\Core\Project\ICSharpCode.Core.csproj">
<Project>{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}</Project>
<Name>ICSharpCode.Core</Name>
</ProjectReference>
<ProjectReference Include="..\..\..\..\Main\ICSharpCode.SharpDevelop.Dom\Project\ICSharpCode.SharpDevelop.Dom.csproj">
<Project>{924EE450-603D-49C1-A8E5-4AFAA31CE6F3}</Project>
<Name>ICSharpCode.SharpDevelop.Dom</Name>
</ProjectReference>
<ProjectReference Include="..\..\UnitTesting\UnitTesting.csproj">
<Project>{1F261725-6318-4434-A1B1-6C70CE4CD324}</Project>
<Name>UnitTesting</Name>
</ProjectReference>
<ProjectReference Include="..\MachineSpecifications\MachineSpecifications.csproj">
<Project>{D1DA3B8F-7313-4BDA-8880-461C5F007751}</Project>
<Name>MachineSpecifications</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" />
</Project>

31
src/AddIns/Analysis/MachineSpecifications/MachineSpecifications.Tests/Properties/AssemblyInfo.cs

@ -0,0 +1,31 @@ @@ -0,0 +1,31 @@
#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("MachineSpecifications.Tests")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("MachineSpecifications.Tests")]
[assembly: AssemblyCopyright("Copyright 2011")]
[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.*")]

70
src/AddIns/Analysis/MachineSpecifications/MachineSpecifications.Tests/Src/ClassFilterBuilder.cs

@ -0,0 +1,70 @@ @@ -0,0 +1,70 @@
/*
* Created by SharpDevelop.
* User: trecio
* Date: 2011-09-23
* Time: 19:53
*
* To change this template use Tools | Options | Coding | Edit Standard Headers.
*/
using System;
using System.Collections.Generic;
using developwithpassion.specifications.extensions;
using developwithpassion.specifications.rhinomocks;
using ICSharpCode.SharpDevelop.Dom;
using ICSharpCode.SharpDevelop.Project;
using ICSharpCode.UnitTesting;
using Machine.Specifications;
using Machine.Fakes.Adapters.Rhinomocks;
namespace ICSharpCode.MachineSpecifications.Tests
{
[Subject(typeof(ClassFilterBuilder))]
public class When_building_class_filter_from_test_selection : Observes<ClassFilterBuilder>
{
const string NAMESPACE_FILTER = "Namespace";
static DefaultClass classAddedExplicitly, classInNamespace, classOutsideNamespace, classNestedInAddedExplicitly, classNestedInClassInNamespace;
static SelectedTests selectedTests;
static IProjectContent projectContent;
static IList<string> result;
Establish ctx = () => {
projectContent = fake.an<IProjectContent>();
projectContent.setup(x => x.SystemTypes).Return(new SystemTypes(projectContent));
var compilationUnit = new DefaultCompilationUnit(projectContent);
classAddedExplicitly = new DefaultClass(compilationUnit, "ClassAddedExplicitly");
classNestedInAddedExplicitly = new DefaultClass(compilationUnit, classAddedExplicitly);
classNestedInAddedExplicitly.FullyQualifiedName = "ClassAddedExplicitly.InnerClass";
classAddedExplicitly.InnerClasses.Add(classNestedInAddedExplicitly);
classInNamespace = new DefaultClass(compilationUnit, "Namespace.OtherNamespace.ClassInNamespace");
classNestedInClassInNamespace = new DefaultClass(compilationUnit, classInNamespace);
classNestedInClassInNamespace.FullyQualifiedName = "Namespace.OtherNamespace.ClassInNamespace.InnerClass";
classInNamespace.InnerClasses.Add(classNestedInClassInNamespace);
classOutsideNamespace = new DefaultClass(compilationUnit, "Namespace2.ClassOutsideNamespac");
var project = fake.an<IProject>();
projectContent.setup(x => x.Classes).Return(new[]{classInNamespace, classOutsideNamespace});
selectedTests = new SelectedTests(project, NAMESPACE_FILTER, classAddedExplicitly, null);
};
Because of = () =>
result = sut.BuildFilterFor(selectedTests, projectContent);
It should_add_dotnet_name_of_selected_test_class = () =>
result.ShouldContain(classAddedExplicitly.DotNetName);
It should_add_class_included_in_selected_namespace = () =>
result.ShouldContain(classInNamespace.DotNetName);
It should_not_include_class_not_included_in_namespace = () =>
result.ShouldNotContain(classOutsideNamespace.DotNetName);
It should_not_include_class_nested_in_selected_test_class = () =>
result.ShouldNotContain(classNestedInAddedExplicitly.DotNetName);
It should_include_class_nested_in_class_from_selected_namespace = () =>
result.ShouldContain(classNestedInClassInNamespace.DotNetName);
}
}

193
src/AddIns/Analysis/MachineSpecifications/MachineSpecifications.Tests/Src/MSpecTestFrameworkTests.cs

@ -0,0 +1,193 @@ @@ -0,0 +1,193 @@
/*
* Created by SharpDevelop.
* User: trecio
* Date: 2011-06-18
* Time: 15:12
*
* To change this template use Tools | Options | Coding | Edit Standard Headers.
*/
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using developwithpassion.specifications.extensions;
using developwithpassion.specifications.dsl;
using developwithpassion.specifications.rhinomocks;
using ICSharpCode.SharpDevelop.Project;
using Machine.Specifications;
using ICSharpCode.UnitTesting;
using ICSharpCode.SharpDevelop.Dom;
using Rhino.Mocks;
namespace ICSharpCode.MachineSpecifications.Tests
{
[Subject(typeof(MSpecTestFramework))]
public class When_checking_if_is_a_test_project : Observes<MSpecTestFramework>
{
static IProject testProject;
static IProject nonTestProject;
static bool resultForTestProject;
static bool resultForNonTestProject;
const string MSpecAssemblyName = "Machine.Specifications";
Establish ctx = () =>
{
testProject = fake.an<IProject>();
var mspecReference = MockRepository.GenerateStub<ReferenceProjectItem>(testProject);
mspecReference.setup(x => x.ShortName).Return(MSpecAssemblyName);
testProject.setup(x => x.Items).Return(new ReadOnlyCollection<ProjectItem>(new[] { mspecReference }));
nonTestProject = fake.an<IProject>();
var otherReference = MockRepository.GenerateStub<ReferenceProjectItem>(nonTestProject);
mspecReference.setup(x => x.ShortName).Return("System.Configuration");
nonTestProject.setup(x => x.Items).Return(new ReadOnlyCollection<ProjectItem>(new[] { otherReference }));
};
Because of = () =>
{
resultForTestProject = sut.IsTestProject(testProject);
resultForNonTestProject = sut.IsTestProject(nonTestProject);
};
It should_return_true_for_project_which_has_reference_to_test_framework = () =>
resultForTestProject.ShouldBeTrue();
It should_return_false_for_project_which_has_no_reference_to_test_framework = () =>
resultForNonTestProject.ShouldBeFalse();
}
public abstract class MSpecTestFrameworkFieldsConcern : Observes<MSpecTestFramework>
{
protected static ICompilationUnit CompilationUnit;
Establish ctx = () =>
{
var ProjectContent = fake.an<IProjectContent>();
ProjectContent.setup(x => x.SystemTypes).Return(new SystemTypes(ProjectContent));
CompilationUnit = new DefaultCompilationUnit(ProjectContent);
};
protected const string MSpecItTypeName = "Machine.Specifications.It";
protected const string MSpecBehavesTypeName = "Machine.Specifications.Behaves_like";
protected const string MSpecBehaviorTypeName = "Machine.Specifications.BehaviorsAttribute";
protected static IClass SetupClass(bool isAbstract, IList<IField> fields, IList<IAttribute> attributes)
{
var c = fake.an<IClass>();
c.setup(x => x.IsAbstract).Return(isAbstract);
c.setup(x => x.Fields).Return(fields);
c.setup(x => x.Attributes).Return(attributes);
return c;
}
protected static IField SetupField(string returnTypeName)
{
var field = fake.an<IField>();
field.ReturnType = SetupReturnType(returnTypeName);
return field;
}
protected static IAttribute SetupBehaviorAttribute()
{
var attribute = fake.an<IAttribute>();
attribute.setup(x => x.AttributeType).Return(SetupReturnType(MSpecBehaviorTypeName));
return attribute;
}
protected static IReturnType SetupReturnType(string typeName)
{
var returnType = fake.an<IReturnType>();
returnType.Stub(x => x.FullyQualifiedName).Return(typeName);
return returnType;
}
}
[Subject(typeof(MSpecTestFramework))]
public class When_checking_if_is_a_test_class : MSpecTestFrameworkFieldsConcern
{
static IClass classWithoutSpecificationMembers;
static IClass classWithSpecificationMembers;
static IClass classWithBehavior;
static IClass classWithSpecificationMembersAndBehaviorAttribute;
static bool resultForClassWithBehaviorAttribute;
static bool resultForClassWithSpecifications;
static bool resultForClassWithBehavior;
static bool resultForClassWithoutSpecifications;
Establish ctx = () =>
{
classWithoutSpecificationMembers = SetupClass(false, new IField[0], new IAttribute[0]);
classWithSpecificationMembers = SetupClass(false, new IField[] { SetupField(MSpecItTypeName) }, new IAttribute[0]);
classWithBehavior = SetupClass(false, new IField[] { SetupField(MSpecBehavesTypeName) }, new IAttribute[0]);
classWithSpecificationMembersAndBehaviorAttribute = SetupClass(false, new IField[] { SetupField(MSpecItTypeName) }, new IAttribute[] { SetupBehaviorAttribute() });
};
Because of = () =>
{
resultForClassWithoutSpecifications = sut.IsTestClass(classWithoutSpecificationMembers);
resultForClassWithSpecifications = sut.IsTestClass(classWithSpecificationMembers);
resultForClassWithBehavior = sut.IsTestClass(classWithBehavior);
resultForClassWithBehaviorAttribute = sut.IsTestClass(classWithSpecificationMembersAndBehaviorAttribute);
};
It should_return_false_for_class_without_specification_members = () =>
resultForClassWithoutSpecifications.ShouldBeFalse();
It should_return_true_for_class_with_specification_members = () =>
resultForClassWithSpecifications.ShouldBeTrue();
It should_return_true_for_class_with_behavior = () =>
resultForClassWithBehavior.ShouldBeTrue();
It should_return_false_for_class_with_behavior_attribute = () =>
resultForClassWithBehaviorAttribute.ShouldBeFalse();
}
public class When_enumerating_test_members : MSpecTestFrameworkFieldsConcern
{
static IClass behaviorClass;
static IField testSpecificationInBehavior;
static IClass testClass;
static IField testSpecification;
static IField otherField;
static IField behavesLikeField;
static IEnumerable<TestMember> result;
const string BehaviorClassName = "Test.Behavior";
Establish ctx = () =>
{
var itReturnType = SetupReturnType(MSpecItTypeName);
behaviorClass = new DefaultClass(CompilationUnit, "BehaviorClass");
testSpecificationInBehavior = new DefaultField(itReturnType, "testSpecificationInBehavior", ModifierEnum.None, DomRegion.Empty, behaviorClass);
behaviorClass.Fields.Add(testSpecificationInBehavior);
testClass = new DefaultClass(CompilationUnit, "TestClass");
testSpecification = new DefaultField(itReturnType, "testSpecification", ModifierEnum.None, DomRegion.Empty, testClass);
testClass.Fields.Add(testSpecification);
otherField = new DefaultField(fake.an<IReturnType>(), "OtherField", ModifierEnum.None, DomRegion.Empty, testClass);
testClass.Fields.Add(otherField);
var behavesLikeReturnType = new ConstructedReturnType(SetupReturnType(MSpecBehavesTypeName), new List<IReturnType>{new DefaultReturnType(behaviorClass)});
behavesLikeField = new DefaultField(behavesLikeReturnType, "behavesLikeField", ModifierEnum.None, new DomRegion(), testClass);
testClass.Fields.Add(behavesLikeField);
};
Because of = () => result = sut.GetTestMembersFor(testClass);
It should_contain_field_with_it_return_type = () =>
result.Select(m => m.Member).ShouldContain(testSpecification);
It should_not_contain_field_with_arbitrary_return_type = () =>
result.Select(m => m.Member).ShouldNotContain(otherField);
It should_contain_imported_field_from_behavior = () =>
result.Select(m => m.Member).ShouldContain(member => member.FullyQualifiedName == "TestClass.testSpecificationInBehavior");
}
}

52
src/AddIns/Analysis/MachineSpecifications/MachineSpecifications.Tests/Src/MSpecUnitTestMonitorTests.cs

@ -0,0 +1,52 @@ @@ -0,0 +1,52 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using Machine.Specifications;
using developwithpassion.specifications.rhinomocks;
using ICSharpCode.UnitTesting;
namespace ICSharpCode.MachineSpecifications.Tests.Src
{
public class When_getting_test_results_from_external_runner : Observes<MSpecUnitTestMonitor>
{
private Because of = () =>
{
sut.Start();
sut.TestFinished += (source, e) => FinishedTests.Add(e.Result);;
sut.FileName = FILE_NAME;
sut.Read();
sut.Stop();
};
private It should_create_test_result_for_passed_test_with_status_set_to_success = () =>
AssertHasResultType("Namespace.TestClass.Passed_Test", TestResultType.Success);
private It should_create_result_for_failed_test_with_status_set_to_failure = () =>
AssertHasResultType("Namespace.TestClass.Failed_Test", TestResultType.Failure);
private It should_have_stack_trace_for_failed_test = () =>
FinishedTests.Where(t => t.ResultType == TestResultType.Failure)
.Select(t => t.StackTrace).ShouldContainOnly("Stack trace");
private It should_have_message_for_failed_test = () =>
FinishedTests.Where(t => t.ResultType == TestResultType.Failure)
.Select(t => t.Message).ShouldContainOnly("Test failure description.");
private It should_create_result_for_not_implemented_test_with_status_set_to_ignored = () =>
AssertHasResultType("Namespace.TestClass.Not_Implemented_Test", TestResultType.Ignored);
private It should_create_result_for_ignored_test_with_status_set_to_ignored = () =>
AssertHasResultType("Namespace.TestClass.Ignored_Test", TestResultType.Ignored);
private static readonly string FILE_NAME = @"Data\\MSpecUnitTestMonitorTestsSampleData.xml";
private static readonly IList<TestResult> FinishedTests = new List<TestResult>();
private static void AssertHasResultType(string testName, TestResultType result)
{
FinishedTests.ShouldContain(x => x.Name == testName);
FinishedTests.Single(x => x.Name == testName).ResultType.ShouldEqual(result);
}
}
}

8
src/AddIns/Analysis/MachineSpecifications/MachineSpecifications.Tests/packages.config

@ -0,0 +1,8 @@ @@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Machine.Specifications" version="0.4.13.0" />
<package id="Machine.Fakes" version="0.2.3.3" />
<package id="RhinoMocks" version="3.6" />
<package id="Machine.Fakes.RhinoMocks" version="0.2.3.3" />
<package id="developwithpassion.specifications.rhinomocks" version="0.4.13.0" />
</packages>

77
src/AddIns/Analysis/MachineSpecifications/MachineSpecifications.sln

@ -0,0 +1,77 @@ @@ -0,0 +1,77 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
# SharpDevelop 4.2.0.8235-alpha
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MachineSpecifications", "MachineSpecifications\MachineSpecifications.csproj", "{D1DA3B8F-7313-4BDA-8880-461C5F007751}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MachineSpecifications.Tests", "MachineSpecifications.Tests\MachineSpecifications.Tests.csproj", "{172AE35D-2051-4977-AC13-0BF1B76374D5}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Core", "..\..\..\Main\Core\Project\ICSharpCode.Core.csproj", "{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop", "..\..\..\Main\Base\Project\ICSharpCode.SharpDevelop.csproj", "{2748AD25-9C63-4E12-877B-4DCE96FBED54}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.Dom", "..\..\..\Main\ICSharpCode.SharpDevelop.Dom\Project\ICSharpCode.SharpDevelop.Dom.csproj", "{924EE450-603D-49C1-A8E5-4AFAA31CE6F3}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnitTesting", "..\UnitTesting\UnitTesting.csproj", "{1F261725-6318-4434-A1B1-6C70CE4CD324}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{D1DA3B8F-7313-4BDA-8880-461C5F007751}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D1DA3B8F-7313-4BDA-8880-461C5F007751}.Debug|x86.ActiveCfg = Debug|x86
{D1DA3B8F-7313-4BDA-8880-461C5F007751}.Debug|x86.Build.0 = Debug|x86
{D1DA3B8F-7313-4BDA-8880-461C5F007751}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D1DA3B8F-7313-4BDA-8880-461C5F007751}.Release|x86.ActiveCfg = Release|x86
{D1DA3B8F-7313-4BDA-8880-461C5F007751}.Release|x86.Build.0 = Release|x86
{172AE35D-2051-4977-AC13-0BF1B76374D5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{172AE35D-2051-4977-AC13-0BF1B76374D5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{172AE35D-2051-4977-AC13-0BF1B76374D5}.Debug|x86.ActiveCfg = Debug|Any CPU
{172AE35D-2051-4977-AC13-0BF1B76374D5}.Debug|x86.Build.0 = Debug|Any CPU
{172AE35D-2051-4977-AC13-0BF1B76374D5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{172AE35D-2051-4977-AC13-0BF1B76374D5}.Release|Any CPU.Build.0 = Release|Any CPU
{172AE35D-2051-4977-AC13-0BF1B76374D5}.Release|x86.ActiveCfg = Release|Any CPU
{172AE35D-2051-4977-AC13-0BF1B76374D5}.Release|x86.Build.0 = Release|Any CPU
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}.Debug|x86.ActiveCfg = Debug|Any CPU
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}.Debug|x86.Build.0 = Debug|Any CPU
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}.Release|Any CPU.Build.0 = Release|Any CPU
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}.Release|x86.ActiveCfg = Release|Any CPU
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}.Release|x86.Build.0 = Release|Any CPU
{2748AD25-9C63-4E12-877B-4DCE96FBED54}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2748AD25-9C63-4E12-877B-4DCE96FBED54}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2748AD25-9C63-4E12-877B-4DCE96FBED54}.Debug|x86.ActiveCfg = Debug|Any CPU
{2748AD25-9C63-4E12-877B-4DCE96FBED54}.Debug|x86.Build.0 = Debug|Any CPU
{2748AD25-9C63-4E12-877B-4DCE96FBED54}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2748AD25-9C63-4E12-877B-4DCE96FBED54}.Release|Any CPU.Build.0 = Release|Any CPU
{2748AD25-9C63-4E12-877B-4DCE96FBED54}.Release|x86.ActiveCfg = Release|Any CPU
{2748AD25-9C63-4E12-877B-4DCE96FBED54}.Release|x86.Build.0 = Release|Any CPU
{924EE450-603D-49C1-A8E5-4AFAA31CE6F3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{924EE450-603D-49C1-A8E5-4AFAA31CE6F3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{924EE450-603D-49C1-A8E5-4AFAA31CE6F3}.Debug|x86.ActiveCfg = Debug|Any CPU
{924EE450-603D-49C1-A8E5-4AFAA31CE6F3}.Debug|x86.Build.0 = Debug|Any CPU
{924EE450-603D-49C1-A8E5-4AFAA31CE6F3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{924EE450-603D-49C1-A8E5-4AFAA31CE6F3}.Release|Any CPU.Build.0 = Release|Any CPU
{924EE450-603D-49C1-A8E5-4AFAA31CE6F3}.Release|x86.ActiveCfg = Release|Any CPU
{924EE450-603D-49C1-A8E5-4AFAA31CE6F3}.Release|x86.Build.0 = Release|Any CPU
{1F261725-6318-4434-A1B1-6C70CE4CD324}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1F261725-6318-4434-A1B1-6C70CE4CD324}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1F261725-6318-4434-A1B1-6C70CE4CD324}.Debug|x86.ActiveCfg = Debug|Any CPU
{1F261725-6318-4434-A1B1-6C70CE4CD324}.Debug|x86.Build.0 = Debug|Any CPU
{1F261725-6318-4434-A1B1-6C70CE4CD324}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1F261725-6318-4434-A1B1-6C70CE4CD324}.Release|Any CPU.Build.0 = Release|Any CPU
{1F261725-6318-4434-A1B1-6C70CE4CD324}.Release|x86.ActiveCfg = Release|Any CPU
{1F261725-6318-4434-A1B1-6C70CE4CD324}.Release|x86.Build.0 = Release|Any CPU
{D1DA3B8F-7313-4BDA-8880-461C5F007751}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D1DA3B8F-7313-4BDA-8880-461C5F007751}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

24
src/AddIns/Analysis/MachineSpecifications/MachineSpecifications/AddInWritingHelp.txt

@ -0,0 +1,24 @@ @@ -0,0 +1,24 @@
You have created a new SharpDevelop AddIn project.
We would like to point out that there are three locations where you can get information on how
to write SharpDevelop AddIns:
- http://wiki.sharpdevelop.net/ (section Developer Zone)
- The folder "doc/technotes" in the SharpDevelop source code download
- You can ask questions about AddIn development in the SharpDevelop forum:
http://community.sharpdevelop.net/forums/
The next steps:
- First, you have to add references to the SharpDevelop assemblies.
An AddIn will work with the SharpDevelop version it was compiled for, or later service releases.
You might want to compile against SharpDevelop 3.0.0.3800 (the first official release of SharpDevelop 3)
to ensure your AddIn runs with all later 3.x versions of SharpDevelop.
- Include a <Manifest> section to your .addin for use with the SharpDevelop AddIn Manager.
See SharpDevelop/doc/technotes/AddInManager.rtf for more information.
- Once you have published your AddIn on the Internet, please add it to the SharpDevelop wiki to let other users know!
http://wiki.sharpdevelop.net/3rdPartyAddins.ashx
This file serves as a reminder for you on how to find information on SharpDevelop AddIn development, you can
remove it from your project if you don't need it anymore.

31
src/AddIns/Analysis/MachineSpecifications/MachineSpecifications/Configuration/AssemblyInfo.cs

@ -0,0 +1,31 @@ @@ -0,0 +1,31 @@
#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("MachineSpecifications")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("MachineSpecifications")]
[assembly: AssemblyCopyright("Copyright 2011")]
[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.*")]

15
src/AddIns/Analysis/MachineSpecifications/MachineSpecifications/MachineSpecifications.addin

@ -0,0 +1,15 @@ @@ -0,0 +1,15 @@
<AddIn name = "Machine.Specifications Addin"
author = "Tomasz Tretkowski"
url = ""
description = "Runner for Machine.Specifications unit tests for SharpDevelop">
<Runtime>
<Import assembly = "MachineSpecifications.dll"/>
</Runtime>
<Path name="/SharpDevelop/UnitTesting/TestFrameworks">
<TestFramework id="mspec"
class="ICSharpCode.MachineSpecifications.MSpecTestFramework"
supportedProjects=".csproj" />
</Path>
</AddIn>

130
src/AddIns/Analysis/MachineSpecifications/MachineSpecifications/MachineSpecifications.csproj

@ -0,0 +1,130 @@ @@ -0,0 +1,130 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build">
<PropertyGroup>
<OutputType>Library</OutputType>
<RootNamespace>ICSharpCode.MachineSpecifications</RootNamespace>
<AssemblyName>MachineSpecifications</AssemblyName>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{D1DA3B8F-7313-4BDA-8880-461C5F007751}</ProjectGuid>
<OutputPath>..\..\..\..\..\AddIns\Analysis\MachineSpecifications\</OutputPath>
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
<NoStdLib>False</NoStdLib>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<WarningLevel>4</WarningLevel>
<TargetFrameworkProfile>
</TargetFrameworkProfile>
<PlatformTarget>AnyCPU</PlatformTarget>
<RegisterForComInterop>False</RegisterForComInterop>
<GenerateSerializationAssemblies>Auto</GenerateSerializationAssemblies>
<BaseAddress>4194304</BaseAddress>
<FileAlignment>4096</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<Optimize>False</Optimize>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugSymbols>true</DebugSymbols>
<DebugType>Full</DebugType>
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<Optimize>True</Optimize>
<DefineConstants>TRACE</DefineConstants>
<DebugSymbols>False</DebugSymbols>
<DebugType>None</DebugType>
<CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data" />
<Reference Include="System.Data.DataSetExtensions">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Xml" />
<Reference Include="System.Xml.Linq">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
</ItemGroup>
<ItemGroup>
<None Include="..\..\..\..\Tools\Machine.Specifications\CommandLine.dll">
<Link>Tools\Machine.Specifications\CommandLine.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="..\..\..\..\Tools\Machine.Specifications\License.txt">
<Link>Tools\Machine.Specifications\License.txt</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="..\..\..\..\Tools\Machine.Specifications\Machine.Specifications.dll">
<Link>Tools\Machine.Specifications\Machine.Specifications.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="..\..\..\..\Tools\Machine.Specifications\Machine.Specifications.Reporting.dll">
<Link>Tools\Machine.Specifications\Machine.Specifications.Reporting.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="..\..\..\..\Tools\Machine.Specifications\mspec-clr4.exe">
<Link>Tools\Machine.Specifications\mspec-clr4.exe</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="..\..\..\..\Tools\Machine.Specifications\mspec-x86-clr4.exe">
<Link>Tools\Machine.Specifications\mspec-x86-clr4.exe</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="..\..\..\..\Tools\Machine.Specifications\mspec-x86.exe">
<Link>Tools\Machine.Specifications\mspec-x86.exe</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="..\..\..\..\Tools\Machine.Specifications\mspec.exe">
<Link>Tools\Machine.Specifications\mspec.exe</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="..\..\..\..\Tools\Machine.Specifications\Spark.dll">
<Link>Tools\Machine.Specifications\Spark.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="AddInWritingHelp.txt" />
<None Include="MachineSpecifications.addin">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
<SubType>Designer</SubType>
</None>
</ItemGroup>
<ItemGroup>
<Compile Include="Configuration\AssemblyInfo.cs" />
<Compile Include="src\BehaviorImportedTestMember.cs" />
<Compile Include="src\ClassFilterBuilder.cs" />
<Compile Include="src\MSpecApplication.cs" />
<Compile Include="src\MSpecTestDebugger.cs" />
<Compile Include="src\MSpecTestFramework.cs" />
<Compile Include="src\MspecTestRunner.cs" />
<Compile Include="src\MSpecUnitTestMonitor.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\..\Main\Base\Project\ICSharpCode.SharpDevelop.csproj">
<Project>{2748AD25-9C63-4E12-877B-4DCE96FBED54}</Project>
<Name>ICSharpCode.SharpDevelop</Name>
<Private>False</Private>
</ProjectReference>
<ProjectReference Include="..\..\..\..\Main\Core\Project\ICSharpCode.Core.csproj">
<Project>{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}</Project>
<Name>ICSharpCode.Core</Name>
<Private>False</Private>
</ProjectReference>
<ProjectReference Include="..\..\..\..\Main\ICSharpCode.SharpDevelop.Dom\Project\ICSharpCode.SharpDevelop.Dom.csproj">
<Project>{924EE450-603D-49C1-A8E5-4AFAA31CE6F3}</Project>
<Name>ICSharpCode.SharpDevelop.Dom</Name>
<Private>False</Private>
</ProjectReference>
<ProjectReference Include="..\..\UnitTesting\UnitTesting.csproj">
<Project>{1F261725-6318-4434-A1B1-6C70CE4CD324}</Project>
<Name>UnitTesting</Name>
<Private>False</Private>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Folder Include="Tools" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" />
</Project>

4
src/AddIns/Analysis/MachineSpecifications/MachineSpecifications/packages.config

@ -0,0 +1,4 @@ @@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Machine.Specifications" version="0.4.9.0" />
</packages>

25
src/AddIns/Analysis/MachineSpecifications/MachineSpecifications/src/BehaviorImportedTestMember.cs

@ -0,0 +1,25 @@ @@ -0,0 +1,25 @@
/*
* Created by SharpDevelop.
* User: trecio
* Date: 2011-10-24
* Time: 23:11
*
* To change this template use Tools | Options | Coding | Edit Standard Headers.
*/
using System;
using ICSharpCode.SharpDevelop.Dom;
using ICSharpCode.UnitTesting;
namespace ICSharpCode.MachineSpecifications
{
/// <summary>
/// Description of BehaviorImportedClass.
/// </summary>
public class BehaviorImportedTestMember : BaseTestMember
{
public BehaviorImportedTestMember(IClass testClass, IMember behaviorMember)
: base(testClass, behaviorMember, behaviorMember.Name)
{
}
}
}

43
src/AddIns/Analysis/MachineSpecifications/MachineSpecifications/src/ClassFilterBuilder.cs

@ -0,0 +1,43 @@ @@ -0,0 +1,43 @@
/*
* Created by SharpDevelop.
* User: trecio
* Date: 2011-09-23
* Time: 19:40
*
* To change this template use Tools | Options | Coding | Edit Standard Headers.
*/
using System;
using System.Collections.Generic;
using ICSharpCode.SharpDevelop.Dom;
using ICSharpCode.UnitTesting;
namespace ICSharpCode.MachineSpecifications
{
/// <summary>
/// Creates class list filter for tests which should be run.
/// </summary>
public class ClassFilterBuilder
{
public IList<string> BuildFilterFor(SelectedTests tests, IProjectContent @using) {
var projectContent = @using;
var filter = new List<string>();
if (tests.Class != null)
filter.Add(tests.Class.DotNetName);
if (tests.NamespaceFilter != null)
foreach (var projectClass in projectContent.Classes)
if (projectClass.FullyQualifiedName.StartsWith(tests.NamespaceFilter + "."))
Add(projectClass, to: filter);
return filter;
}
static void Add(IClass @class, IList<string> to)
{
var list = to;
to.Add(@class.DotNetName);
foreach (var innerClass in @class.InnerClasses)
Add(innerClass, to: list);
}
}
}

138
src/AddIns/Analysis/MachineSpecifications/MachineSpecifications/src/MSpecApplication.cs

@ -0,0 +1,138 @@ @@ -0,0 +1,138 @@
/*
* Created by SharpDevelop.
* User: trecio
* Date: 2011-06-18
* Time: 14:56
*
* To change this template use Tools | Options | Coding | Edit Standard Headers.
*/
using System;
using System.Collections.Generic;
using System.Diagnostics;
using ICSharpCode.SharpDevelop;
using ICSharpCode.SharpDevelop.Dom;
using ICSharpCode.UnitTesting;
using System.IO;
using ICSharpCode.Core;
using ICSharpCode.SharpDevelop.Project;
using System.Text;
namespace ICSharpCode.MachineSpecifications
{
/// <summary>
/// Description of MSpecApplication.
/// </summary>
public class MSpecApplication
{
public MSpecApplication(SelectedTests tests) {
InitializeFrom(tests);
}
public ProcessStartInfo GetProcessStartInfo() {
var result = new ProcessStartInfo();
result.FileName = ExecutableFileName;
result.Arguments = GetArguments();
result.WorkingDirectory = WorkingDirectory;
return result;
}
public string Results {get;set;}
void InitializeFrom(SelectedTests tests) {
this.tests = tests;
project = tests.Project;
}
SelectedTests tests;
IProject project;
string GetArguments()
{
var builder = new StringBuilder();
builder.Append("--xml \"");
builder.Append(FileUtility.GetAbsolutePath(Environment.CurrentDirectory, Results));
builder.Append("\" ");
var filterFileName = CreateFilterFile();
if (filterFileName != null)
{
builder.Append("-f \"");
builder.Append(FileUtility.GetAbsolutePath(Environment.CurrentDirectory, filterFileName));
builder.Append("\" ");
}
builder.Append("\"");
builder.Append(project.OutputAssemblyFullPath);
builder.Append("\"");
return builder.ToString();
}
string CreateFilterFile()
{
var classFilterBuilder = new ClassFilterBuilder();
var projectContent = ParserService.GetProjectContent(project);
var filter = classFilterBuilder.BuildFilterFor(tests, @using: projectContent);
string path = null;
if (filter.Count > 0) {
path = Path.GetTempFileName();
using (var stream = new FileStream(path, FileMode.Create, FileAccess.Write))
using (var writer = new StreamWriter(stream))
foreach (var testClassName in filter) {
writer.WriteLine(testClassName);
}
}
return path;
}
string ExecutableFileName {
get {
var assemblyDirectory = Path.GetDirectoryName(new Uri(typeof(MSpecApplication).Assembly.CodeBase).LocalPath);
var runnerDirectory = Path.Combine(assemblyDirectory, @"Tools\Machine.Specifications");
string executableName = "mspec";
if (TargetPlatformIs32Bit(project))
executableName += "-x86";
if (UsesClr4(project))
executableName += "-clr4";
executableName += ".exe";
return Path.Combine(runnerDirectory, executableName);
}
}
private bool UsesClr4(IProject project)
{
MSBuildBasedProject msbuildProject = project as MSBuildBasedProject;
if (msbuildProject != null)
{
string targetFrameworkVersion = msbuildProject.GetEvaluatedProperty("TargetFrameworkVersion");
return String.Equals(targetFrameworkVersion, "v4.0", StringComparison.OrdinalIgnoreCase);
}
return false;
}
private bool TargetPlatformIs32Bit(IProject project)
{
MSBuildBasedProject msbuildProject = project as MSBuildBasedProject;
if (msbuildProject != null)
{
string platformTarget = msbuildProject.GetEvaluatedProperty("PlatformTarget");
return String.Compare(platformTarget, "x86", true) == 0;
}
return false;
}
string WorkingDirectory
{
get
{
return Path.GetDirectoryName(project.OutputAssemblyFullPath);
}
}
}
}

36
src/AddIns/Analysis/MachineSpecifications/MachineSpecifications/src/MSpecTestDebugger.cs

@ -0,0 +1,36 @@ @@ -0,0 +1,36 @@
/*
* Created by SharpDevelop.
* User: trecio
* Date: 2011-06-18
* Time: 14:02
*
* To change this template use Tools | Options | Coding | Edit Standard Headers.
*/
using System;
using System.Diagnostics;
using ICSharpCode.UnitTesting;
namespace ICSharpCode.MachineSpecifications
{
/// <summary>
/// Description of MSpecTestDebugger.
/// </summary>
public class MSpecTestDebugger : TestDebuggerBase
{
public MSpecTestDebugger()
: base(new UnitTestDebuggerService(), new UnitTestMessageService(), new MSpecUnitTestMonitor())
{ }
protected override ProcessStartInfo GetProcessStartInfo(SelectedTests selectedTests)
{
var app = new MSpecApplication(selectedTests);
app.Results = TestResultsMonitor.FileName;
return app.GetProcessStartInfo();
}
protected override TestResult CreateTestResultForTestFramework(TestResult testResult)
{
return testResult;
}
}
}

117
src/AddIns/Analysis/MachineSpecifications/MachineSpecifications/src/MSpecTestFramework.cs

@ -0,0 +1,117 @@ @@ -0,0 +1,117 @@
/*
* Created by SharpDevelop.
* User: trecio
* Date: 2011-06-18
* Time: 13:31
*
* To change this template use Tools | Options | Coding | Edit Standard Headers.
*/
using System;
using System.Collections.Generic;
using System.Linq;
using ICSharpCode.Core;
using ICSharpCode.SharpDevelop.Dom;
using ICSharpCode.SharpDevelop.Project;
using ICSharpCode.UnitTesting;
namespace ICSharpCode.MachineSpecifications
{
/// <summary>
/// Description of MSpecTestFramework.
/// </summary>
public class MSpecTestFramework : ITestFramework
{
public bool IsTestMember(IMember member) {
return member is IField
&& HasItReturnType(member as IField);
}
public bool IsTestClass(IClass c) {
return HasSpecificationMembers(c) && !HasBehaviorAttribute(c);
}
public IEnumerable<TestMember> GetTestMembersFor(IClass @class) {
return GetTestMembers(@class, @class.Fields);
}
private IEnumerable<TestMember> GetTestMembers(IClass testClass, IList<IField> fields)
{
var result = fields.Where(HasItReturnType).Select(field => new TestMember(field)).ToList();
foreach (var field in fields)
if (HasBehavesLikeReturnType(field))
{
var behaviorFields = ResolveBehaviorFieldsOf(field);
var behaviorMembers = behaviorFields.Where(HasItReturnType);
var testMembersFromBehavior = behaviorMembers.Select(testField =>
new TestMember(testField.DeclaringType, new BehaviorImportedTestMember(testClass, testField)));
result.AddRange(testMembersFromBehavior);
}
return result;
}
public bool IsTestProject(IProject project) {
if (project != null) {
foreach (ProjectItem item in project.Items)
if (IsMSpecAssemblyReference(item))
return true;
}
return false;
}
public ITestRunner CreateTestRunner() {
return new MSpecTestRunner();
}
public ITestRunner CreateTestDebugger() {
return new MSpecTestDebugger();
}
public bool IsBuildNeededBeforeTestRun {
get {return true;}
}
private IList<IField> ResolveBehaviorFieldsOf(IField field)
{
var fieldReturnType = field.ReturnType.CastToConstructedReturnType();
if (fieldReturnType == null) return new List<IField>();
if (fieldReturnType.TypeArguments.Count != 1)
LoggingService.Error(string.Format("Expected behavior specification {0} to have one type argument but {1} found.", field.FullyQualifiedName, fieldReturnType.TypeArgumentCount));
var behaviorClassType = fieldReturnType.TypeArguments.FirstOrDefault();
return behaviorClassType != null ? behaviorClassType.GetFields() : new List<IField>();
}
private bool HasSpecificationMembers(IClass c) {
return !c.IsAbstract
&& c.Fields.Any(f => HasItReturnType(f) || HasBehavesLikeReturnType(f));
}
private bool HasBehavesLikeReturnType(IField field) {
return MSpecBehavesLikeFQName.Equals(field.ReturnType.FullyQualifiedName);
}
private bool HasItReturnType(IField field) {
return MSpecItFQName.Equals(field.ReturnType.FullyQualifiedName);
}
private bool HasBehaviorAttribute(IClass c) {
return c.Attributes.Any(
attribute => MSpecBehaviorsAttributeFQName.Equals(attribute.AttributeType.FullyQualifiedName));
}
private bool IsMSpecAssemblyReference(ProjectItem projectItem) {
if (projectItem is ReferenceProjectItem) {
ReferenceProjectItem refProjectItem = projectItem as ReferenceProjectItem;
string name = refProjectItem.ShortName;
return MSpecAssemblyName.Equals(name, StringComparison.OrdinalIgnoreCase);
}
return false;
}
const string MSpecAssemblyName = "Machine.Specifications";
const string MSpecItFQName = MSpecAssemblyName + ".It";
const string MSpecBehavesLikeFQName = MSpecAssemblyName + ".Behaves_like";
const string MSpecBehaviorsAttributeFQName = MSpecAssemblyName + ".BehaviorsAttribute";
}
}

137
src/AddIns/Analysis/MachineSpecifications/MachineSpecifications/src/MSpecUnitTestMonitor.cs

@ -0,0 +1,137 @@ @@ -0,0 +1,137 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ICSharpCode.UnitTesting;
using System.IO;
using ICSharpCode.Core;
using System.Xml;
namespace ICSharpCode.MachineSpecifications
{
public class MSpecUnitTestMonitor : ITestResultsMonitor
{
public event TestFinishedEventHandler TestFinished;
private FileSystemWatcher fileSystemWatcher;
private ISet<string> reportedResults;
public MSpecUnitTestMonitor()
{
FileName = Path.GetTempFileName();
}
public string FileName { get; set; }
public void Stop()
{
if (fileSystemWatcher != null)
{
fileSystemWatcher.Dispose();
fileSystemWatcher = null;
}
}
public void Start()
{
fileSystemWatcher = new FileSystemWatcher(Path.GetDirectoryName(FileName), Path.GetFileName(FileName));
reportedResults = new HashSet<string>();
if (File.Exists(FileName))
{
fileSystemWatcher.NotifyFilter = NotifyFilters.LastWrite;
fileSystemWatcher.Changed += ObservedFileChanged;
} else
fileSystemWatcher.Created += ObservedFileCreated;
fileSystemWatcher.Error += FileObservationError;
fileSystemWatcher.EnableRaisingEvents = true;
}
void FileObservationError(object sender, ErrorEventArgs e)
{
LoggingService.Error("Error while waiting for unit test session report modification.", e.GetException());
}
void ObservedFileCreated(object sender, FileSystemEventArgs e)
{
fileSystemWatcher.Created -= ObservedFileCreated;
fileSystemWatcher.NotifyFilter = NotifyFilters.LastWrite;
fileSystemWatcher.Changed += ObservedFileChanged;
}
void ObservedFileChanged(object sender, FileSystemEventArgs e)
{
Read();
}
public void Read()
{
var document = new XmlDocument();
try
{
document.Load(FileName);
}
catch (XmlException e)
{
LoggingService.Warn("Error reading Machine.Specifications test results.", e);
return;
}
var contextNodes = document.SelectNodes("MSpec/assembly/concern/context/specification");
var results = contextNodes.Cast<XmlNode>().Select(BuildTestResultFrom).ToArray();
PublishTestResults(results);
}
TestResult BuildTestResultFrom(XmlNode node)
{
var className = node.SelectSingleNode("../@type-name").InnerText;
var result = new TestResult(className + "." + node.Attributes["field-name"].InnerText);
switch (node.Attributes["status"].InnerText)
{
case "failed":
result.ResultType = TestResultType.Failure;
break;
case "passed":
result.ResultType = TestResultType.Success;
break;
case "not-implemented":
case "ignored":
result.ResultType = TestResultType.Ignored;
break;
}
var errorNode = node.SelectSingleNode("error");
if (errorNode != null)
{
var messageNode = errorNode.SelectSingleNode("message");
result.Message = messageNode.InnerText;
var stackTraceNode = errorNode.SelectSingleNode("stack-trace");
result.StackTrace = stackTraceNode.InnerText;
}
return result;
}
void PublishTestResults(TestResult[] testResults)
{
if (TestFinished != null)
foreach (var result in testResults)
if (!reportedResults.Contains(result.Name)) {
TestFinished(this, new TestFinishedEventArgs(result));
reportedResults.Add(result.Name);
}
}
public long InitialFilePosition { get; set; }
public void Dispose()
{
Stop();
try
{
File.Delete(FileName);
}
catch (Exception e)
{
LoggingService.Warn("Could delete temporary file.", e);
}
}
}
}

36
src/AddIns/Analysis/MachineSpecifications/MachineSpecifications/src/MspecTestRunner.cs

@ -0,0 +1,36 @@ @@ -0,0 +1,36 @@
/*
* Created by SharpDevelop.
* User: trecio
* Date: 2011-06-18
* Time: 14:01
*
* To change this template use Tools | Options | Coding | Edit Standard Headers.
*/
using System;
using ICSharpCode.UnitTesting;
using System.Diagnostics;
namespace ICSharpCode.MachineSpecifications
{
/// <summary>
/// Description of MspecTestRunner.
/// </summary>
public class MSpecTestRunner : TestProcessRunnerBase
{
public MSpecTestRunner()
: base(new UnitTestProcessRunner(), new MSpecUnitTestMonitor(), new UnitTestFileService(), new UnitTestMessageService())
{ }
protected override ProcessStartInfo GetProcessStartInfo(SelectedTests selectedTests)
{
var app = new MSpecApplication(selectedTests);
app.Results = TestResultsMonitor.FileName;
return app.GetProcessStartInfo();
}
protected override TestResult CreateTestResultForTestFramework(TestResult testResult)
{
return testResult;
}
}
}

8
src/AddIns/Analysis/UnitTesting/Src/AbstractRunTestCommand.cs

@ -317,10 +317,10 @@ namespace ICSharpCode.UnitTesting @@ -317,10 +317,10 @@ namespace ICSharpCode.UnitTesting
if (testProgressMonitor == null) {
OnBeforeRunTests();
testProgressMonitor = context.StatusBarService.CreateProgressMonitor();
totalProjectCount = selectedTests.Projects.Count;
totalProjectCount = selectedTests.ProjectsCount;
}
testProgressMonitor.TaskName = GetProgressMonitorLabel(selectedTests.Project);
testProgressMonitor.Progress = GetProgress(selectedTests.Projects);
testProgressMonitor.Progress = GetProgress(selectedTests.ProjectsCount);
testRunner = CreateTestRunner(selectedTests.Project);
if (testRunner != null) {
@ -342,9 +342,9 @@ namespace ICSharpCode.UnitTesting @@ -342,9 +342,9 @@ namespace ICSharpCode.UnitTesting
return StringParser.Parse("${res:ICSharpCode.UnitTesting.StatusBarProgressLabel}", tagPair);
}
double GetProgress(IList<IProject> projectsLeftToRun)
double GetProgress(int projectsLeftToRunCount)
{
return (double)(totalProjectCount - projectsLeftToRun.Count) / totalProjectCount;
return (double)(totalProjectCount - projectsLeftToRunCount) / totalProjectCount;
}
protected virtual ITestRunner CreateTestRunner(IProject project)

71
src/AddIns/Analysis/UnitTesting/Src/BaseTestMember.cs

@ -0,0 +1,71 @@ @@ -0,0 +1,71 @@
// 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.UnitTesting
{
/// <summary>
/// Represents a test member that exists in a base class.
/// </summary>
/// <remarks>
/// In order to have the Unit Test tree run the correct
/// test when we have a class that has a base class with
/// test members is to return the derived class from the
/// DeclaringType's property. Otherwise the base class
/// member is tested and the derived class is not used.
/// </remarks>
public class BaseTestMember : AbstractMember
{
IMember member;
/// <summary>
/// Creates a new instance of the BaseTestMember.
/// </summary>
/// <param name="derivedClass">The derived class and not
/// the class where the method is actually defined.</param>
/// <param name="method">The base class's test member.</param>
public BaseTestMember(IClass derivedClass, IMember member)
: this(derivedClass, member, member.DeclaringType.Name + "." + member.Name)
{
}
protected BaseTestMember(IClass derivedClass, IMember member, string name)
: base(derivedClass, name)
{
this.member = member;
this.ReturnType = member.ReturnType;
this.Modifiers = member.Modifiers;
this.Region = member.Region;
this.BodyRegion = member.BodyRegion;
this.Documentation = member.Documentation;
}
/// <summary>
/// Gets the actual method used to create this object.
/// </summary>
public IMember Member {
get { return member; }
}
public override EntityType EntityType {
get {
return member.EntityType;
}
}
public override string DocumentationTag {
get {
return null;
}
}
public override string Documentation {get;set;}
public override IMember Clone()
{
return new BaseTestMember(DeclaringType, Member);
}
}
}

42
src/AddIns/Analysis/UnitTesting/Src/BaseTestMethod.cs

@ -1,42 +0,0 @@ @@ -1,42 +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.SharpDevelop.Dom;
namespace ICSharpCode.UnitTesting
{
/// <summary>
/// Represents a test method that exists in a base class.
/// </summary>
/// <remarks>
/// In order to have the Unit Test tree run the correct
/// test when we have a class that has a base class with
/// test methods is to return the derived class from the
/// DeclaringType's property. Otherwise the base class
/// method is tested and the derived class is not used.
/// </remarks>
public class BaseTestMethod : DefaultMethod
{
IMethod method;
/// <summary>
/// Creates a new instance of the BaseTestMethod.
/// </summary>
/// <param name="derivedClass">The derived class and not
/// the class where the method is actually defined.</param>
/// <param name="method">The base class's test method.</param>
public BaseTestMethod(IClass derivedClass, IMethod method)
: base(method.Name, method.ReturnType, method.Modifiers, method.Region, method.BodyRegion, derivedClass)
{
this.method = method;
}
/// <summary>
/// Gets the actual method used to create this object.
/// </summary>
public IMethod Method {
get { return method; }
}
}
}

3
src/AddIns/Analysis/UnitTesting/Src/IRegisteredTestFrameworks.cs

@ -2,6 +2,7 @@ @@ -2,6 +2,7 @@
// 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;
using ICSharpCode.SharpDevelop.Project;
@ -17,6 +18,8 @@ namespace ICSharpCode.UnitTesting @@ -17,6 +18,8 @@ namespace ICSharpCode.UnitTesting
bool IsTestClass(IClass c);
bool IsTestProject(IProject project);
IEnumerable<TestMember> GetTestMembersFor(IClass @class);
bool IsBuildNeededBeforeTestRunForProject(IProject project);
}
}

47
src/AddIns/Analysis/UnitTesting/Src/InnerClassEnumerator.cs

@ -0,0 +1,47 @@ @@ -0,0 +1,47 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ICSharpCode.SharpDevelop.Dom;
namespace ICSharpCode.UnitTesting
{
public class InnerClassEnumerator : IEnumerable<IClass>
{
readonly IClass _c;
public InnerClassEnumerator(IClass c)
{
_c = c;
}
#region IEnumerable<IClass> Members
public IEnumerator<IClass> GetEnumerator()
{
var result = new List<IClass>();
Visit(_c, result);
return result.GetEnumerator();
}
#endregion
#region IEnumerable Members
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
{
return GetEnumerator();
}
#endregion
private void Visit(IClass c, List<IClass> resultList)
{
foreach (var innerClass in c.InnerClasses)
{
resultList.Add(innerClass);
Visit(innerClass, resultList);
}
}
}
}

21
src/AddIns/Analysis/UnitTesting/Src/NUnitTestFramework.cs

@ -2,6 +2,8 @@ @@ -2,6 +2,8 @@
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
using System;
using System.Linq;
using System.Collections.Generic;
using ICSharpCode.SharpDevelop.Dom;
using ICSharpCode.SharpDevelop.Project;
@ -42,6 +44,8 @@ namespace ICSharpCode.UnitTesting @@ -42,6 +44,8 @@ namespace ICSharpCode.UnitTesting
/// </summary>
public bool IsTestClass(IClass c)
{
if (c == null) return false;
if (c.IsAbstract) return false;
StringComparer nameComparer = GetNameComparer(c);
if (nameComparer != null) {
NUnitTestAttributeName testAttributeName = new NUnitTestAttributeName("TestFixture", nameComparer);
@ -51,10 +55,19 @@ namespace ICSharpCode.UnitTesting @@ -51,10 +55,19 @@ namespace ICSharpCode.UnitTesting
}
}
}
while (c != null) {
if (HasTestMethod(c)) return true;
c = c.BaseClass;
}
return false;
}
StringComparer GetNameComparer(IClass c)
private bool HasTestMethod(IClass c) {
return GetTestMembersFor(c).Any();
}
static StringComparer GetNameComparer(IClass c)
{
if (c != null) {
IProjectContent projectContent = c.ProjectContent;
@ -82,7 +95,11 @@ namespace ICSharpCode.UnitTesting @@ -82,7 +95,11 @@ namespace ICSharpCode.UnitTesting
return false;
}
bool IsTestMethod(IMethod method)
public IEnumerable<TestMember> GetTestMembersFor(IClass @class) {
return @class.Methods.Where(IsTestMethod).Select(member => new TestMember(member));
}
static bool IsTestMethod(IMethod method)
{
var nameComparer = GetNameComparer(method.DeclaringType);
if (nameComparer != null) {

9
src/AddIns/Analysis/UnitTesting/Src/RegisteredTestFrameworks.cs

@ -22,7 +22,7 @@ namespace ICSharpCode.UnitTesting @@ -22,7 +22,7 @@ namespace ICSharpCode.UnitTesting
{
if (project != null) {
foreach (TestFrameworkDescriptor descriptor in testFrameworkDescriptors) {
if (descriptor.IsSupportedProject(project)) {
if (descriptor.IsSupportedProject(project) && descriptor.TestFramework.IsTestProject(project)) {
return descriptor.TestFramework;
}
}
@ -39,6 +39,13 @@ namespace ICSharpCode.UnitTesting @@ -39,6 +39,13 @@ namespace ICSharpCode.UnitTesting
return false;
}
public IEnumerable<TestMember> GetTestMembersFor(IClass @class) {
ITestFramework testFramework = GetTestFramework(@class);
if (testFramework != null)
return testFramework.GetTestMembersFor(@class);
return new TestMember[0];
}
ITestFramework GetTestFramework(IMember member)
{
if (member != null) {

6
src/AddIns/Analysis/UnitTesting/Src/SelectedTests.cs

@ -64,10 +64,14 @@ namespace ICSharpCode.UnitTesting @@ -64,10 +64,14 @@ namespace ICSharpCode.UnitTesting
}
}
public IList<IProject> Projects {
public IEnumerable<IProject> Projects {
get { return projects; }
}
public int ProjectsCount {
get {return projects.Count;}
}
public IProject Project {
get {
if (projects.Count > 0) {

67
src/AddIns/Analysis/UnitTesting/Src/TestClass.cs

@ -2,6 +2,7 @@ @@ -2,6 +2,7 @@
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
using System;
using System.Linq;
using System.Collections.Generic;
using ICSharpCode.Core;
using ICSharpCode.SharpDevelop.Dom;
@ -36,6 +37,11 @@ namespace ICSharpCode.UnitTesting @@ -36,6 +37,11 @@ namespace ICSharpCode.UnitTesting
get { return c; }
}
/// <summary>
/// Gets the list of other (e.g. base types) classes where from which test members included in this test class come from.
/// </summary>
private readonly ICollection<string> baseClassesFQNames = new List<string>();
/// <summary>
/// Gets the test classes that exist in the specified namespace.
/// </summary>
@ -90,11 +96,16 @@ namespace ICSharpCode.UnitTesting @@ -90,11 +96,16 @@ namespace ICSharpCode.UnitTesting
/// Gets the name of the class.
/// </summary>
public string Name {
get {
if (c.DeclaringType != null) {
return String.Concat(c.DeclaringType.Name, "+", c.Name);
get
{
var currentClass = c;
var name = c.Name;
while(currentClass.DeclaringType != null)
{
name = String.Concat(currentClass.DeclaringType.Name, "+", name);
currentClass = currentClass.DeclaringType;
}
return c.Name;
return name;
}
}
@ -109,11 +120,12 @@ namespace ICSharpCode.UnitTesting @@ -109,11 +120,12 @@ namespace ICSharpCode.UnitTesting
/// Gets the namespace of this class.
/// </summary>
public string Namespace {
get {
if (c.DeclaringType != null) {
return c.DeclaringType.Namespace;
}
return c.Namespace;
get
{
var currentClass = c;
while (currentClass.DeclaringType != null)
currentClass = currentClass.DeclaringType;
return currentClass.Namespace;
}
}
@ -274,23 +286,20 @@ namespace ICSharpCode.UnitTesting @@ -274,23 +286,20 @@ namespace ICSharpCode.UnitTesting
TestMemberCollection GetTestMembers(IClass c)
{
TestMemberCollection testMembers = new TestMemberCollection();
foreach (IMember member in c.AllMembers) {
if (IsTestMember(member)) {
foreach (var member in testFrameworks.GetTestMembersFor(c))
if (!testMembers.Contains(member.Name)) {
testMembers.Add(new TestMember(member));
}
}
testMembers.Add(member);
}
// Add base class test members.
IClass declaringType = c;
while (c.BaseClass != null) {
foreach (IMethod method in c.BaseClass.Methods) {
if (IsTestMember(method)) {
BaseTestMethod baseTestMethod = new BaseTestMethod(declaringType, method);
TestMember testMethod = new TestMember(c.BaseClass.Name, baseTestMethod);
if (method.IsVirtual) {
if (!testMembers.Contains(method.Name)) {
while (c.BaseClass != null)
{
foreach (var testMember in testFrameworks.GetTestMembersFor(c.BaseClass)) {
BaseTestMember baseTestMethod = new BaseTestMember(declaringType, testMember.Member);
TestMember testMethod = new TestMember(c.BaseClass, baseTestMethod);
if (testMember.Member.IsVirtual) {
if (!testMembers.Contains(testMember.Name)) {
testMembers.Add(testMethod);
}
} else {
@ -299,15 +308,14 @@ namespace ICSharpCode.UnitTesting @@ -299,15 +308,14 @@ namespace ICSharpCode.UnitTesting
}
}
}
}
c = c.BaseClass;
}
return testMembers;
}
bool IsTestMember(IMember member)
{
return testFrameworks.IsTestMember(member);
baseClassesFQNames.Clear();
foreach (var memberDeclaringClass in testMembers.Select(member => member.DeclaringType).Distinct())
if (memberDeclaringClass.CompareTo(declaringType) != 0)
baseClassesFQNames.Add(memberDeclaringClass.FullyQualifiedName);
return testMembers;
}
/// <summary>
@ -365,5 +373,10 @@ namespace ICSharpCode.UnitTesting @@ -365,5 +373,10 @@ namespace ICSharpCode.UnitTesting
}
return null;
}
public bool IsDerivedFrom(IClass c)
{
return baseClassesFQNames.Contains(c.FullyQualifiedName);
}
}
}

3
src/AddIns/Analysis/UnitTesting/Src/TestFramework.cs

@ -2,6 +2,7 @@ @@ -2,6 +2,7 @@
// 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;
using ICSharpCode.SharpDevelop.Project;
@ -13,6 +14,8 @@ namespace ICSharpCode.UnitTesting @@ -13,6 +14,8 @@ namespace ICSharpCode.UnitTesting
bool IsTestClass(IClass c);
bool IsTestProject(IProject project);
IEnumerable<TestMember> GetTestMembersFor(IClass @class);
ITestRunner CreateTestRunner();
ITestRunner CreateTestDebugger();

19
src/AddIns/Analysis/UnitTesting/Src/TestMember.cs

@ -11,7 +11,9 @@ namespace ICSharpCode.UnitTesting @@ -11,7 +11,9 @@ namespace ICSharpCode.UnitTesting
/// </summary>
public class TestMember
{
#if unused
string prefix = String.Empty;
#endif
IMember member;
TestResultType testResultType = TestResultType.None;
@ -23,8 +25,10 @@ namespace ICSharpCode.UnitTesting @@ -23,8 +25,10 @@ namespace ICSharpCode.UnitTesting
public TestMember(IMember member)
{
this.member = member;
this.DeclaringType = member.DeclaringType;
}
#if unused
/// <summary>
/// Creates a new TestMember instance.
/// </summary>
@ -46,6 +50,13 @@ namespace ICSharpCode.UnitTesting @@ -46,6 +50,13 @@ namespace ICSharpCode.UnitTesting
this.member = member;
this.prefix = prefix;
}
#endif
public TestMember(IClass testClass, IMember member)
{
this.DeclaringType = testClass;
this.member = member;
}
/// <summary>
/// Gets the underlying IMember for this TestMember.
@ -54,6 +65,12 @@ namespace ICSharpCode.UnitTesting @@ -54,6 +65,12 @@ namespace ICSharpCode.UnitTesting
get { return member; }
}
/// <summary>
/// Gets the class where the test member is actually declared.
/// In case of test member from base class it will be the base class not the
/// </summary>
public IClass DeclaringType { get; private set; }
/// <summary>
/// Updates the test member based on new information
/// in the specified IMember.
@ -82,9 +99,11 @@ namespace ICSharpCode.UnitTesting @@ -82,9 +99,11 @@ namespace ICSharpCode.UnitTesting
/// </summary>
public string Name {
get {
#if unused
if (prefix.Length > 0) {
return String.Concat(prefix, ".", member.Name);
}
#endif
return member.Name;
}
}

55
src/AddIns/Analysis/UnitTesting/Src/TestMethodTreeNode.cs

@ -0,0 +1,55 @@ @@ -0,0 +1,55 @@
// 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.Gui;
using ICSharpCode.SharpDevelop.Project;
namespace ICSharpCode.UnitTesting
{
/// <summary>
/// Represents a method that has the [Test] attribute associated with it.
/// </summary>
public class TestMethodTreeNode : TestTreeNode
{
TestMethod testMethod;
public TestMethodTreeNode(TestProject project, TestMethod testMethod)
: base(project, testMethod.Name)
{
this.testMethod = testMethod;
testMethod.ResultChanged += TestMethodResultChanged;
UpdateImageListIndex(testMethod.Result);
}
/// <summary>
/// Gets the underlying IMethod for this test method.
/// </summary>
public IMember Method {
get {
return testMethod.Method;
}
}
/// <summary>
/// Removes the TestMethod.ResultChanged event handler.
/// </summary>
public override void Dispose()
{
if (!IsDisposed) {
testMethod.ResultChanged -= TestMethodResultChanged;
}
base.Dispose();
}
/// <summary>
/// Updates the node's icon after the test method result
/// has changed.
/// </summary>
void TestMethodResultChanged(object source, EventArgs e)
{
UpdateImageListIndex(testMethod.Result);
}
}
}

42
src/AddIns/Analysis/UnitTesting/Src/TestProject.cs

@ -3,6 +3,7 @@ @@ -3,6 +3,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using ICSharpCode.Core;
using ICSharpCode.SharpDevelop.Dom;
using ICSharpCode.SharpDevelop.Project;
@ -130,7 +131,7 @@ namespace ICSharpCode.UnitTesting @@ -130,7 +131,7 @@ namespace ICSharpCode.UnitTesting
if (newUnit != null) {
foreach (IClass c in newUnit.Classes) {
UpdateTestClass(c);
foreach (IClass innerClass in c.InnerClasses) {
foreach (IClass innerClass in new InnerClassEnumerator(c)) {
UpdateTestClass(innerClass);
removedClasses.Remove(innerClass);
}
@ -188,22 +189,51 @@ namespace ICSharpCode.UnitTesting @@ -188,22 +189,51 @@ namespace ICSharpCode.UnitTesting
/// </summary>
void UpdateTestClass(IClass c)
{
if (TestClasses.Contains(c.DotNetName)) {
if (IsTestClass(c)) {
if (TestClasses.Contains(c.DotNetName))
{
if (IsTestClass(c))
{
TestClass testClass = TestClasses[c.DotNetName];
testClass.UpdateClass(c);
} else {
}
else
{
// TestFixture attribute has been removed so
// remove the class from the set of TestClasses.
TestClasses.Remove(c.DotNetName);
}
} else {
}
else
{
// TestFixture attribute may have been recently added to
// this class so call AddNewTestClass. No need to
// check if the class is actually a test class since
// AddNewTestClass does this anyway.
AddNewTestClass(c);
}
var derivedTestClasses = GetTestClassesDerivedFrom(c);
if (derivedTestClasses.Any())
UpdateClassesFromProjectContent(derivedTestClasses);
}
private IEnumerable<IClass> GetTestClassesDerivedFrom(IClass c)
{
return TestClasses
.Where(testClass => testClass.IsDerivedFrom(c))
.Select(testClass => testClass.Class)
.ToArray();
}
private void UpdateClassesFromProjectContent(IEnumerable<IClass> classes)
{
foreach (var c in classes)
{
var classInProjectContent = projectContent.GetClass(c.FullyQualifiedName, c.TypeParameters.Count);
if (classInProjectContent != null)
UpdateTestClass(classInProjectContent);
}
}
void GetTestClasses()
@ -215,7 +245,7 @@ namespace ICSharpCode.UnitTesting @@ -215,7 +245,7 @@ namespace ICSharpCode.UnitTesting
testClasses.Add(CreateTestClass(c));
}
}
foreach (IClass innerClass in c.InnerClasses) {
foreach (IClass innerClass in new InnerClassEnumerator(c)) {
if (IsTestClass(innerClass)) {
if (!testClasses.Contains(innerClass.DotNetName)) {
testClasses.Add(CreateTestClass(innerClass));

4
src/AddIns/Analysis/UnitTesting/Src/UnitTestCommands.cs

@ -71,9 +71,9 @@ namespace ICSharpCode.UnitTesting @@ -71,9 +71,9 @@ namespace ICSharpCode.UnitTesting
{
IMember member = treeView.SelectedMember;
if (member != null) {
BaseTestMethod baseTestMethod = member as BaseTestMethod;
BaseTestMember baseTestMethod = member as BaseTestMember;
if (baseTestMethod != null) {
return baseTestMethod.Method;
return baseTestMethod.Member;
}
}
return member;

8
src/AddIns/Analysis/UnitTesting/Test/Frameworks/NUnitTestFrameworkIsTestClassTests.cs

@ -37,6 +37,14 @@ namespace UnitTesting.Tests.Frameworks @@ -37,6 +37,14 @@ namespace UnitTesting.Tests.Frameworks
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()
{

294
src/AddIns/Analysis/UnitTesting/Test/Frameworks/RegisteredTestFrameworksTestFixture.cs

@ -0,0 +1,294 @@ @@ -0,0 +1,294 @@
// 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 RegisteredTestFrameworksTestFixture
{
RegisteredTestFrameworks testFrameworks;
MockTestFramework nunitTestFramework;
MockTestFramework mbUnitTestFramework;
MockCSharpProject project;
MockMethod method;
MockClass clazz;
[SetUp]
public void Init()
{
List<TestFrameworkDescriptor> descriptors = new List<TestFrameworkDescriptor>();
MockTestFrameworkFactory factory = new MockTestFrameworkFactory();
Properties mbUnitProperties = new Properties();
mbUnitProperties["id"] = "mbunit";
mbUnitProperties["class"] = "MBUnitTestFramework";
mbUnitProperties["supportedProjects"] = ".vbproj";
mbUnitTestFramework = new MockTestFramework();
factory.Add("MBUnitTestFramework", mbUnitTestFramework);
Properties nunitProperties = new Properties();
nunitProperties["id"] = "nunit";
nunitProperties["class"] = "NUnitTestFramework";
nunitProperties["supportedProjects"] = ".csproj";
nunitTestFramework = new MockTestFramework();
factory.Add("NUnitTestFramework", nunitTestFramework);
TestFrameworkDescriptor mbUnitDescriptor = new TestFrameworkDescriptor(mbUnitProperties, factory);
TestFrameworkDescriptor nunitDescriptor = new TestFrameworkDescriptor(nunitProperties, factory);
descriptors.Add(mbUnitDescriptor);
descriptors.Add(nunitDescriptor);
MockAddInTree addinTree = new MockAddInTree();
addinTree.AddItems("/SharpDevelop/UnitTesting/TestFrameworks", descriptors);
testFrameworks = new RegisteredTestFrameworks(addinTree);
project = new MockCSharpProject();
nunitTestFramework.AddTestProject(project);
mbUnitTestFramework.AddTestProject(project);
method = MockMethod.CreateMockMethodWithoutAnyAttributes();
method.MockDeclaringType.MockProjectContent.Project = project;
clazz = MockClass.CreateMockClassWithoutAnyAttributes();
clazz.MockProjectContent.Project = project;
}
[Test]
public void NUnitTestFrameworkRegisteredForUseWithProjectsWithCSharpProjectFileExtension()
{
project.FileName = @"d:\projects\test\MyProj.csproj";
Assert.AreEqual(nunitTestFramework, testFrameworks.GetTestFrameworkForProject(project));
}
[Test]
public void MbUnitTestFrameworkRegisteredForUseWithProjectsWithVBNetProjectFileExtension()
{
project.FileName = @"d:\projects\test\MyProj.vbproj";
Assert.AreEqual(mbUnitTestFramework, testFrameworks.GetTestFrameworkForProject(project));
}
[Test]
public void IsTestMethodReturnsFalseForUnknownMbUnitFrameworkTestMethod()
{
method.MockDeclaringType.MockProjectContent.ProjectAsIProject.FileName = @"d:\projects\test.vbproj";
Assert.IsFalse(testFrameworks.IsTestMethod(method));
}
[Test]
public void IsTestMethodReturnsTrueForKnownMbUnitFrameworkTestMethod()
{
method.MockDeclaringType.MockProjectContent.ProjectAsIProject.FileName = @"d:\projects\test.vbproj";
mbUnitTestFramework.AddTestMethod(method);
Assert.IsTrue(testFrameworks.IsTestMethod(method));
}
[Test]
public void IsTestMethodDoesNotThrowNullReferenceExceptionWhenNoTestFrameworkSupportsProject()
{
method.MockDeclaringType.MockProjectContent.ProjectAsIProject.FileName = @"d:\projects\test.unknown";
Assert.IsFalse(testFrameworks.IsTestMethod(method));
}
[Test]
public void IsTestMethodDoesNotThrowNullReferenceWhenNullPassedToMethod()
{
Assert.IsFalse(testFrameworks.IsTestMethod(null));
}
[Test]
public void IsTestClassReturnsFalseForUnknownMbUnitFrameworkTestClass()
{
clazz.MockProjectContent.ProjectAsIProject.FileName = @"d:\projects\test.vbproj";
Assert.IsFalse(testFrameworks.IsTestClass(clazz));
}
[Test]
public void IsTestClassReturnsTrueForKnownMbUnitFrameworkTestClass()
{
clazz.MockProjectContent.ProjectAsIProject.FileName = @"d:\projects\test.vbproj";
mbUnitTestFramework.AddTestClass(clazz);
Assert.IsTrue(testFrameworks.IsTestClass(clazz));
}
[Test]
public void IsTestClassDoesNotThrowNullReferenceExceptionWhenNoTestFrameworkSupportsProject()
{
clazz.MockProjectContent.ProjectAsIProject.FileName = @"d:\projects\test.unknown";
Assert.IsFalse(testFrameworks.IsTestClass(clazz));
}
[Test]
public void IsTestClassDoesNotThrowNullReferenceWhenNullPassedToMethod()
{
Assert.IsFalse(testFrameworks.IsTestClass(null));
}
[Test]
public void IsTestProjectReturnsFalseForUnknownMbUnitFrameworkTestProject()
{
project = new MockCSharpProject();
project.FileName = @"d:\projects\test.vbproj";
Assert.IsFalse(testFrameworks.IsTestProject(project));
}
[Test]
public void IsTestProjectReturnsTrueForKnownMbUnitFrameworkTestProject()
{
project = new MockCSharpProject();
project.FileName = @"d:\projects\test.vbproj";
mbUnitTestFramework.AddTestProject(project);
Assert.IsTrue(testFrameworks.IsTestProject(project));
}
[Test]
public void IsTestProjectDoesNotThrowNullReferenceExceptionWhenNoTestFrameworkSupportsProject()
{
project.FileName = @"d:\projects\test.unknown";
Assert.IsFalse(testFrameworks.IsTestProject(project));
}
[Test]
public void IsTestProjectDoesNotThrowNullReferenceWhenNullPassedToMethod()
{
Assert.IsFalse(testFrameworks.IsTestProject(null));
}
[Test]
public void CreateTestRunnerReturnsNewTestRunnerFromCorrectTestFramework()
{
project.FileName = @"d:\projects\test.csproj";
ITestRunner testRunner = testFrameworks.CreateTestRunner(project);
ITestRunner[] expectedTestRunners = new ITestRunner[] { testRunner };
Assert.AreEqual(expectedTestRunners, nunitTestFramework.TestRunnersCreated.ToArray());
}
[Test]
public void CreateTestRunnerDoesNotThrowNullRefExceptionWhenUnknownProjectPassedToCreateTestRunnerMethod()
{
project.FileName = @"d:\projects\test.unknown";
Assert.IsNull(testFrameworks.CreateTestRunner(project));
}
[Test]
public void CreateTestDebuggerReturnsNewTestRunnerFromCorrectTestFramework()
{
project.FileName = @"d:\projects\test.csproj";
ITestRunner testDebugger = testFrameworks.CreateTestDebugger(project);
ITestRunner[] expectedTestRunners = new ITestRunner[] { testDebugger };
Assert.AreEqual(expectedTestRunners, nunitTestFramework.TestDebuggersCreated.ToArray());
}
[Test]
public void CreateTestDebuggerDoesNotThrowNullRefExceptionWhenUnknownProjectPassedToCreateTestRunnerMethod()
{
project.FileName = @"d:\projects\test.unknown";
Assert.IsNull(testFrameworks.CreateTestDebugger(project));
}
[Test]
public void IsBuildNeededBeforeTestRunReturnsTrueWhenTestFrameworkIsBuildNeededBeforeTestRunSetToTrue()
{
project.FileName = @"d:\projects\test.csproj";
nunitTestFramework.IsBuildNeededBeforeTestRun = true;
Assert.IsTrue(testFrameworks.IsBuildNeededBeforeTestRunForProject(project));
}
[Test]
public void IsBuildNeededBeforeTestRunReturnsFalseWhenTestFrameworkIsBuildNeededBeforeTestRunSetToFalse()
{
project.FileName = @"d:\projects\test.csproj";
nunitTestFramework.IsBuildNeededBeforeTestRun = false;
Assert.IsFalse(testFrameworks.IsBuildNeededBeforeTestRunForProject(project));
}
}
[TestFixture]
public class RegisteredTestFrameworksWithTwoFrameworksForTheSameProjectType
{
MockCSharpProject nunitTestProject;
MockTestFramework nunitTestFramework;
MockCSharpProject mspecTestProject;
MockTestFramework mspecTestFramework;
RegisteredTestFrameworks testFrameworks;
[SetUp]
public void Setup()
{
var factory = new MockTestFrameworkFactory();
Properties nunitProperties = new Properties();
nunitProperties["id"] = "nunit";
nunitProperties["class"] = "NUnitTestFramework";
nunitProperties["supportedProjects"] = ".csproj";
nunitTestFramework = new MockTestFramework();
factory.Add("NUnitTestFramework", nunitTestFramework);
var mspecProperties = new Properties();
mspecProperties["id"] = "mspec";
mspecProperties["class"] = "MSpecTestFramework";
mspecProperties["supportedProjects"] = ".csproj";
mspecTestFramework = new MockTestFramework();
factory.Add("MSpecTestFramework", mspecTestFramework);
TestFrameworkDescriptor mspecDescriptor = new TestFrameworkDescriptor(mspecProperties, factory);
TestFrameworkDescriptor nunitDescriptor = new TestFrameworkDescriptor(nunitProperties, factory);
var descriptors = new List<TestFrameworkDescriptor> { mspecDescriptor, nunitDescriptor };
MockAddInTree addinTree = new MockAddInTree();
addinTree.AddItems("/SharpDevelop/UnitTesting/TestFrameworks", descriptors);
testFrameworks = new RegisteredTestFrameworks(addinTree);
nunitTestProject = new MockCSharpProject();
nunitTestProject.FileName = @"d:\projects\nunitTestProject.csproj";
nunitTestFramework.AddTestProject(nunitTestProject);
mspecTestProject = new MockCSharpProject();
mspecTestProject.FileName = @"d:\projects\mspecTestProject.csproj";
mspecTestFramework.AddTestProject(mspecTestProject);
}
[Test]
public void ItShouldReturnMSpecTestFrameworkForMSpecTestProject()
{
Assert.AreSame(mspecTestFramework, testFrameworks.GetTestFrameworkForProject(mspecTestProject), "Expected mspec test framework.");
}
[Test]
public void ItShouldReturnNUnitTestFrameworkForNUnitTestProject()
{
Assert.AreSame(nunitTestFramework, testFrameworks.GetTestFrameworkForProject(nunitTestProject), "Expected nunit test framework.");
}
}
}

10
src/AddIns/Analysis/UnitTesting/Test/Project/BaseTestMethodTestFixture.cs

@ -18,7 +18,7 @@ namespace UnitTesting.Tests.Project @@ -18,7 +18,7 @@ namespace UnitTesting.Tests.Project
{
MockClass mockClass;
MockMethod mockMethod;
BaseTestMethod baseTestMethod;
BaseTestMember baseTestMethod;
DomRegion mockMethodRegion;
DomRegion mockMethodBodyRegion;
DefaultReturnType returnType;
@ -39,13 +39,13 @@ namespace UnitTesting.Tests.Project @@ -39,13 +39,13 @@ namespace UnitTesting.Tests.Project
returnType = new DefaultReturnType(returnTypeClass);
mockMethod.ReturnType = returnType;
baseTestMethod = new BaseTestMethod(mockClass, mockMethod);
baseTestMethod = new BaseTestMember(mockClass, mockMethod);
}
[Test]
public void MethodName()
{
Assert.AreEqual("MyMethod", baseTestMethod.Name);
Assert.AreEqual("MyTestFixture.MyMethod", baseTestMethod.Name);
}
[Test]
@ -57,7 +57,7 @@ namespace UnitTesting.Tests.Project @@ -57,7 +57,7 @@ namespace UnitTesting.Tests.Project
[Test]
public void ActualMethod()
{
Assert.AreEqual(mockMethod, baseTestMethod.Method);
Assert.AreEqual(mockMethod, baseTestMethod.Member);
}
[Test]
@ -81,7 +81,7 @@ namespace UnitTesting.Tests.Project @@ -81,7 +81,7 @@ namespace UnitTesting.Tests.Project
[Test]
public void ReturnType()
{
Assert.IsTrue(Object.ReferenceEquals(returnType, baseTestMethod.ReturnType));
Assert.AreSame(returnType, baseTestMethod.ReturnType);
}
}
}

74
src/AddIns/Analysis/UnitTesting/Test/Project/DoubleNestedTestClassWithBaseType.cs

@ -0,0 +1,74 @@ @@ -0,0 +1,74 @@
/*
* Created by SharpDevelop.
* User: trecio
* Date: 2011-10-23
* Time: 16:15
*
* To change this template use Tools | Options | Coding | Edit Standard Headers.
*/
using System;
using System.Linq;
using ICSharpCode.UnitTesting;
using NUnit.Framework;
using UnitTesting.Tests.Utils;
namespace UnitTesting.Tests.Project
{
/// <summary>
/// Tests that a class with base type nested inside test fixture is recognized, e.g.
///
/// public abstract class BaseClass {
/// [Test]
/// public void BaseFoo() {
/// }
/// }
///
/// [TestFixture]
/// public class A
/// {
/// public class InnerATest
/// {
/// [Test]
/// public void FooBar()
/// {
/// }
///
/// public class InnerTestLevel2 : BaseClass {
/// }
/// }
/// }
/// </summary>
[TestFixture]
public class DoubleNestedTestClassWithBaseType : InnerClassTestFixtureBase
{
MockClass classNestedInInnerClass;
MockClass baseClass;
MockMethod testMethodInBaseClass;
[SetUp]
public void SetUp() {
base.InitBase();
baseClass = new MockClass(projectContent, "MyTests.BaseClass");
testMethodInBaseClass = new MockMethod(baseClass, "BaseFoo");
testMethodInBaseClass.Attributes.Add(new MockAttribute("Test"));
baseClass.Methods.Add(testMethodInBaseClass);
//Add TestFixture attribute to outer class
outerClass.Attributes.Add(new MockAttribute("TestFixture"));
//Add inner class nested in test class
classNestedInInnerClass = new MockClass(projectContent, "MyTests.A.InnerATest.InnerTestLevel2", "MyTests.A+InnerATest+InnerTestLevel2", innerClass);
innerClass.InnerClasses.Add(classNestedInInnerClass);
classNestedInInnerClass.AddBaseClass(baseClass);
testProject = new TestProject(null, projectContent, testFrameworks);
}
[Test]
public void DoubleNestedClassShouldHaveTestMemberImportedFromBaseClass() {
var nestedClass = testProject.TestClasses.Single(c => c.Class == classNestedInInnerClass);
Assert.AreEqual("BaseClass.BaseFoo", nestedClass.TestMembers.Single().Name);
}
}
}

8
src/AddIns/Analysis/UnitTesting/Test/Project/DuplicateMethodNameTestFixture.cs

@ -34,7 +34,7 @@ namespace UnitTesting.Tests.Project @@ -34,7 +34,7 @@ namespace UnitTesting.Tests.Project
projectContent.Classes.Add(c);
// Add first method.
MockMethod method = new MockMethod(c, "MyTest");
var method = new MockMethod(c, "MyTest");
method.Attributes.Add(new MockAttribute("Test"));
c.Methods.Add(method);
@ -46,8 +46,10 @@ namespace UnitTesting.Tests.Project @@ -46,8 +46,10 @@ namespace UnitTesting.Tests.Project
baseClass.Attributes.Add(new MockAttribute("TestFixture"));
projectContent.Classes.Add(baseClass);
c.AddBaseClass(baseClass);
baseClass.Methods.Add(method);
baseClass.Methods.Add(method);
var baseClassMethod = new MockMethod(baseClass, "MyTest");
baseClassMethod.Attributes.Add(new MockAttribute("Test"));
baseClass.Methods.Add(baseClassMethod);
baseClass.Methods.Add(baseClassMethod);
// Create test class.
testClass = new TestClass(c, testFrameworks);

110
src/AddIns/Analysis/UnitTesting/Test/Project/InnerClassInTestFixtureTests.cs

@ -0,0 +1,110 @@ @@ -0,0 +1,110 @@
// 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.UnitTesting;
using NUnit.Framework;
using UnitTesting.Tests.Utils;
using System.Linq;
namespace UnitTesting.Tests.Project
{
/// <summary>
/// Tests that a class nested inside test fixture is recognized, e.g.
///
/// [TestFixture]
/// public class A
/// {
/// public class InnerATest
/// {
/// [Test]
/// public void FooBar()
/// {
/// }
///
/// [TestFixture]
/// public class InnerTestLevel2 {
/// }
/// }
///
/// public class InnerBClass() {}
/// }
///
/// </summary>
[TestFixture]
public class InnerClassInTestFixtureTests : InnerClassTestFixtureBase
{
MockClass classNestedInInnerClass;
[SetUp]
public void Init()
{
base.InitBase();
//Add TestFixture attribute to outer class
outerClass.Attributes.Add(new MockAttribute("TestFixture"));
testProject = new TestProject(null, projectContent, testFrameworks);
//Add inner class nested in test class
classNestedInInnerClass = new MockClass(projectContent, "MyTests.A.InnerATest.InnerTestLevel2", "MyTests.A+InnerATest+InnerTestLevel2", innerClass);
classNestedInInnerClass.Attributes.Add(new MockAttribute("TestFixture"));
innerClass.InnerClasses.Add(classNestedInInnerClass);
}
[Test]
public void OuterTestClassFound()
{
AssertTestResultContainsClass(outerClass);
}
[Test]
public void InnerTestClassWithTestFixtureAttributeFound()
{
AssertTestResultContainsClass(innerClass);
}
[Test]
public void InnerNonTestClassWithoutWasNotMarkedAsTestClass()
{
AssertTestResultDoesNotContainClass(nonTestInnerClass);
}
[Test]
public void InnerClassInInnerClassFound()
{
AssertTestResultContainsClass(classNestedInInnerClass);
}
[Test]
public void TestClassNameShouldBeDotNetNameOfTheDoubleNestedClass()
{
Assert.AreEqual("A+InnerATest+InnerTestLevel2", TestClassRelatedTo(classNestedInInnerClass).Name);
}
[Test]
public void TestClassNamespaceShouldBeValid()
{
Assert.AreEqual("MyTests", TestClassRelatedTo(classNestedInInnerClass).Namespace);
}
void AssertTestResultContainsClass(IClass clazz)
{
var testClazz = TestClassRelatedTo(clazz);
if (testClazz == null)
throw new AssertionException(string.Format("Test result should contain class {0}.", clazz.FullyQualifiedName));
}
void AssertTestResultDoesNotContainClass(MockClass clazz)
{
var testClazz = TestClassRelatedTo(clazz);
if (testClazz != null)
throw new AssertionException(string.Format("Test result should not contain class {0}.", clazz.FullyQualifiedName));
}
TestClass TestClassRelatedTo(IClass clazz)
{
return testProject.TestClasses.SingleOrDefault(c => c.Class == clazz);
}
}
}

11
src/AddIns/Analysis/UnitTesting/Test/Project/InnerClassMethodRenamedTestFixture.cs

@ -2,6 +2,7 @@ @@ -2,6 +2,7 @@
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
using System;
using System.Linq;
using ICSharpCode.SharpDevelop.Dom;
using ICSharpCode.UnitTesting;
using NUnit.Framework;
@ -42,6 +43,11 @@ namespace UnitTesting.Tests.Project @@ -42,6 +43,11 @@ namespace UnitTesting.Tests.Project
newInnerClass.Methods.Add(method);
outerClass.InnerClasses.Add(newInnerClass);
MockClass innerClassInInnerClass = new MockClass(projectContent, "MyTests.A.InnerATest.InnerInnerTest", innerClass);
innerClassInInnerClass.SetDotNetName("MyTests.A+InnerATest+InnerInnerTest");
innerClassInInnerClass.Attributes.Add(new MockAttribute("TestFixture"));
newInnerClass.InnerClasses.Add(innerClassInInnerClass);
// Update TestProject's parse info.
testProject.UpdateParseInfo(oldUnit, newUnit);
@ -60,5 +66,10 @@ namespace UnitTesting.Tests.Project @@ -60,5 +66,10 @@ namespace UnitTesting.Tests.Project
{
Assert.AreEqual(1, innerTestClass.TestMembers.Count);
}
[Test]
public void NewTestClassExists() {
CollectionAssert.Contains(testProject.TestClasses.Select(x => x.QualifiedName).ToList(), "MyTests.A+InnerATest+InnerInnerTest");
}
}
}

3
src/AddIns/Analysis/UnitTesting/Test/Project/InnerClassTestFixtureBase.cs

@ -16,6 +16,7 @@ namespace UnitTesting.Tests.Project @@ -16,6 +16,7 @@ namespace UnitTesting.Tests.Project
{
protected TestClass testClass;
protected MockClass innerClass;
protected MockClass nonTestInnerClass;
protected TestProject testProject;
protected MockProjectContent projectContent;
protected MockClass outerClass;
@ -41,7 +42,7 @@ namespace UnitTesting.Tests.Project @@ -41,7 +42,7 @@ namespace UnitTesting.Tests.Project
outerClass.InnerClasses.Add(innerClass);
// Add another inner class that is not a test class.
MockClass nonTestInnerClass = new MockClass(projectContent, "MyTests.A.InnerBClass", outerClass);
nonTestInnerClass = new MockClass(projectContent, "MyTests.A.InnerBClass", outerClass);
outerClass.InnerClasses.Add(nonTestInnerClass);
// Add another inner class with the same name as the InnerATest.

15
src/AddIns/Analysis/UnitTesting/Test/Project/TestClassIsTestMethodUsesTestFrameworksTestFixture.cs

@ -24,18 +24,17 @@ namespace UnitTesting.Tests.Project @@ -24,18 +24,17 @@ namespace UnitTesting.Tests.Project
{
mockTestClass = MockClass.CreateMockClassWithoutAnyAttributes();
mockTestClass.FullyQualifiedName = "DerivedClass";
testMethod = new MockMethod(mockTestClass, "myTestMethod");
mockTestClass.Methods.Add(testMethod);
baseClassTestMethod = new MockMethod(mockTestClass, "myBaseTestMethod");
testFrameworks = new MockRegisteredTestFrameworks();
testFrameworks.AddTestMember(testMethod);
testFrameworks.AddTestMember(baseClassTestMethod);
mockBaseTestClass = MockClass.CreateMockClassWithoutAnyAttributes();
mockBaseTestClass.FullyQualifiedName = "BaseClass";
mockBaseTestClass.Methods.Add(baseClassTestMethod);
baseClassTestMethod = new MockMethod(mockBaseTestClass, "myBaseTestMethod");
testFrameworks = new MockRegisteredTestFrameworks();
testFrameworks.AddTestMember(testMethod);
testFrameworks.AddTestMember(baseClassTestMethod);
mockTestClass.AddBaseClass(mockBaseTestClass);
@ -51,8 +50,8 @@ namespace UnitTesting.Tests.Project @@ -51,8 +50,8 @@ namespace UnitTesting.Tests.Project
[Test]
public void TestClassHasBaseClassTestMethod()
{
BaseTestMethod baseTestMethod = testClass.TestMembers[1].Member as BaseTestMethod;
Assert.AreEqual(baseClassTestMethod, baseTestMethod.Method);
BaseTestMember baseTestMethod = testClass.TestMembers[1].Member as BaseTestMember;
Assert.AreEqual(baseClassTestMethod, baseTestMethod.Member);
}
}
}

6
src/AddIns/Analysis/UnitTesting/Test/Tree/ClassTestFixtureSelectedTestFixture.cs

@ -3,6 +3,8 @@ @@ -3,6 +3,8 @@
using System;
using System.Collections.Generic;
using System.Linq;
using ICSharpCode.SharpDevelop.Project;
using ICSharpCode.UnitTesting;
using NUnit.Framework;
@ -40,9 +42,9 @@ namespace UnitTesting.Tests.Tree @@ -40,9 +42,9 @@ namespace UnitTesting.Tests.Tree
public void SelectedTestsHasOneProject()
{
IProject[] expectedProjects = new IProject[] { project };
List<IProject> actualProjects = new List<IProject>(selectedTests.Projects);
var actualProjects = selectedTests.Projects.ToArray();
Assert.AreEqual(expectedProjects, actualProjects.ToArray());
Assert.AreEqual(expectedProjects, actualProjects);
}
[Test]

2
src/AddIns/Analysis/UnitTesting/Test/Tree/GoToSelectedBaseClassMethodTestFixture.cs

@ -30,7 +30,7 @@ namespace UnitTesting.Tests.Tree @@ -30,7 +30,7 @@ namespace UnitTesting.Tests.Tree
int methodBeginColumn = 6; // 1 based.
baseClassMethod.Region = new DomRegion(methodBeginLine, methodBeginColumn);
BaseTestMethod baseTestMethod = new BaseTestMethod(derivedClass, baseClassMethod);
BaseTestMember baseTestMethod = new BaseTestMember(derivedClass, baseClassMethod);
treeView = new MockTestTreeView();
treeView.SelectedMember = baseTestMethod;

6
src/AddIns/Analysis/UnitTesting/Test/Tree/MethodTestSelectedTestFixture.cs

@ -3,6 +3,8 @@ @@ -3,6 +3,8 @@
using System;
using System.Collections.Generic;
using System.Linq;
using ICSharpCode.SharpDevelop.Project;
using ICSharpCode.UnitTesting;
using NUnit.Framework;
@ -43,9 +45,9 @@ namespace UnitTesting.Tests.Tree @@ -43,9 +45,9 @@ namespace UnitTesting.Tests.Tree
public void SelectedTestsHasOneProject()
{
IProject[] expectedProjects = new IProject[] { project };
List<IProject> actualProjects = new List<IProject>(selectedTests.Projects);
var actualProjects = selectedTests.Projects.ToArray();
Assert.AreEqual(expectedProjects, actualProjects.ToArray());
Assert.AreEqual(expectedProjects, actualProjects);
}
[Test]

8
src/AddIns/Analysis/UnitTesting/Test/Tree/NoOwnerForSelectedTestsTestFixture.cs

@ -3,6 +3,8 @@ @@ -3,6 +3,8 @@
using System;
using System.Collections.Generic;
using System.Linq;
using ICSharpCode.SharpDevelop.Project;
using ICSharpCode.UnitTesting;
using NUnit.Framework;
@ -30,14 +32,14 @@ namespace UnitTesting.Tests.Tree @@ -30,14 +32,14 @@ namespace UnitTesting.Tests.Tree
[Test]
public void SelectedTestsHaveThreeProjects()
{
Assert.AreEqual(3, selectedTests.Projects.Count);
Assert.AreEqual(3, selectedTests.ProjectsCount);
}
[Test]
public void SelectedProjectsMatchProjectsPassedToConstructor()
{
List<IProject> actualProjects = new List<IProject>(selectedTests.Projects);
Assert.AreEqual(projects.ToArray(), actualProjects.ToArray());
var actualProjects = selectedTests.Projects.ToArray();
Assert.AreEqual(projects.ToArray(), actualProjects);
}
[Test]

6
src/AddIns/Analysis/UnitTesting/Test/Tree/SelectedTestsTestFixture.cs

@ -3,6 +3,8 @@ @@ -3,6 +3,8 @@
using System;
using System.Collections.Generic;
using System.Linq;
using ICSharpCode.SharpDevelop.Project;
using ICSharpCode.UnitTesting;
using NUnit.Framework;
@ -49,7 +51,7 @@ namespace UnitTesting.Tests.Tree @@ -49,7 +51,7 @@ namespace UnitTesting.Tests.Tree
[Test]
public void ProjectsReturnsSingleItemContainingProjectPassedToConstructor()
{
List<IProject> projects = new List<IProject>(selectedTests.Projects);
var projects = selectedTests.Projects.ToArray();
IProject[] expectedProjects = new IProject[] { project };
Assert.AreEqual(expectedProjects, projects);
@ -71,7 +73,7 @@ namespace UnitTesting.Tests.Tree @@ -71,7 +73,7 @@ namespace UnitTesting.Tests.Tree
public void RemoveFirstProjectLeavesNoProjects()
{
selectedTests.RemoveFirstProject();
Assert.AreEqual(0, selectedTests.Projects.Count);
Assert.AreEqual(0, selectedTests.ProjectsCount);
}
[Test]

19
src/AddIns/Analysis/UnitTesting/Test/UnitTesting.Tests.csproj

@ -81,6 +81,8 @@ @@ -81,6 +81,8 @@
<Compile Include="Frameworks\UnitTestingOptionsTestFixture.cs" />
<Compile Include="Project\AbstractBaseClassWithTestMethodsTestFixture.cs" />
<Compile Include="Project\BaseTestMethodTestFixture.cs" />
<Compile Include="Project\DoubleNestedTestClassWithBaseType.cs" />
<Compile Include="Project\InnerClassInTestFixtureTests.cs" />
<Compile Include="Project\DuplicateClassNameChangedTestFixture.cs" />
<Compile Include="Project\InnerClassMethodRenamedTestFixture.cs" />
<Compile Include="Project\InnerClassNameChangesTestFixture.cs" />
@ -143,8 +145,12 @@ @@ -143,8 +145,12 @@
<Compile Include="Utils\DerivedRunTestInPadCommand.cs" />
<Compile Include="Utils\DerivedRunTestWithDebuggerCommand.cs" />
<Compile Include="Utils\DerivedTestProjectTreeNode.cs" />
<Compile Include="Utils\DerivedTestTreeView.cs" />
<Compile Include="Utils\DerivedUnitTestingOptionsPanel.cs" />
<Compile Include="Utils\DerivedTestTreeView.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Utils\DerivedUnitTestingOptionsPanel.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Utils\DerivedUnitTestsPad.cs" />
<Compile Include="Utils\JumpedToFile.cs" />
<Compile Include="Utils\MockAddInTree.cs" />
@ -224,7 +230,9 @@ @@ -224,7 +230,9 @@
<Compile Include="Utils\MockProjectContent.cs" />
<Compile Include="Utils\MockAttribute.cs" />
<Compile Include="Tree\OneTestClassTestFixture.cs" />
<Compile Include="Utils\DummyParserServiceTestTreeView.cs" />
<Compile Include="Utils\DummyParserServiceTestTreeView.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Project\TestProjectWithOneClassTestFixture.cs" />
<Compile Include="Project\ClassRootNamespaceTests.cs" />
<Compile Include="Project\TwoProjectRootNamespacesTestFixture.cs" />
@ -249,7 +257,6 @@ @@ -249,7 +257,6 @@
<Compile Include="Utils\MockCSharpProject.cs" />
</ItemGroup>
<ItemGroup>
<Folder Include="Utils\Tests" />
<ProjectReference Include="..\UnitTesting.csproj">
<Project>{1F261725-6318-4434-A1B1-6C70CE4CD324}</Project>
<Name>UnitTesting</Name>
@ -266,14 +273,10 @@ @@ -266,14 +273,10 @@
<Project>{924EE450-603D-49C1-A8E5-4AFAA31CE6F3}</Project>
<Name>ICSharpCode.SharpDevelop.Dom</Name>
</ProjectReference>
<Folder Include="Frameworks" />
<Folder Include="Utils" />
<ProjectReference Include="..\..\..\..\Libraries\NRefactory\Project\NRefactory.csproj">
<Project>{3A9AE6AA-BC07-4A2F-972C-581E3AE2F195}</Project>
<Name>NRefactory</Name>
</ProjectReference>
<Folder Include="Tree" />
<Folder Include="Project" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" />
</Project>

4
src/AddIns/Analysis/UnitTesting/Test/Utils/MockNUnitTestFramework.cs

@ -54,6 +54,10 @@ namespace UnitTesting.Tests.Utils @@ -54,6 +54,10 @@ namespace UnitTesting.Tests.Utils
throw new NotImplementedException();
}
public IEnumerable<TestMember> GetTestMembersFor(IClass @class) {
throw new NotImplementedException();
}
public bool IsTestClass(IClass c)
{
throw new NotImplementedException();

2
src/AddIns/Analysis/UnitTesting/Test/Utils/MockProjectContent.cs

@ -70,7 +70,7 @@ namespace UnitTesting.Tests.Utils @@ -70,7 +70,7 @@ namespace UnitTesting.Tests.Utils
public string GetXmlDocumentation(string memberTag)
{
throw new NotImplementedException();
return string.Empty;
}
public void AddClassToNamespaceList(IClass addClass)

5
src/AddIns/Analysis/UnitTesting/Test/Utils/MockTestFramework.cs

@ -2,6 +2,7 @@ @@ -2,6 +2,7 @@
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
using System;
using System.Linq;
using System.Collections.Generic;
using ICSharpCode.SharpDevelop.Dom;
using ICSharpCode.SharpDevelop.Project;
@ -31,6 +32,10 @@ namespace UnitTesting.Tests.Utils @@ -31,6 +32,10 @@ namespace UnitTesting.Tests.Utils
return testMembers.Contains(member);
}
public IEnumerable<TestMember> GetTestMembersFor(IClass @class) {
return testMembers.Where(member => member.DeclaringType == @class).Select(member => new TestMember(member));
}
public IMember IsTestMemberParameterUsed {
get { return isTestMemberParameterUsed; }
}

2
src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/SelectedTestsWithTestMethodTestFixture.cs

@ -29,7 +29,7 @@ namespace UnitTesting.Tests.Utils.Tests @@ -29,7 +29,7 @@ namespace UnitTesting.Tests.Utils.Tests
[Test]
public void SelectedTestsHasOneProjectSelected()
{
Assert.AreEqual(1, selectedTestsWithTestMethod.Projects.Count);
Assert.AreEqual(1, selectedTestsWithTestMethod.ProjectsCount);
}
[Test]

13
src/AddIns/Analysis/UnitTesting/UnitTesting.csproj

@ -60,6 +60,7 @@ @@ -60,6 +60,7 @@
</ItemGroup>
<ItemGroup>
<Compile Include="Src\IFileSystem.cs" />
<Compile Include="Src\InnerClassEnumerator.cs" />
<Compile Include="Src\IUnitTestMessageService.cs" />
<Compile Include="Src\MultipleProjectBuildable.cs" />
<Compile Include="Src\TestMemberEventArgs.cs" />
@ -80,7 +81,7 @@ @@ -80,7 +81,7 @@
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</None>
<Compile Include="Src\AllTestsTreeNode.cs" />
<Compile Include="Src\BaseTestMethod.cs" />
<Compile Include="Src\BaseTestMember.cs" />
<Compile Include="Src\EmptyUnitTestsPad.cs" />
<Compile Include="Src\IAddInTree.cs" />
<Compile Include="Src\IBuildOptions.cs" />
@ -122,7 +123,9 @@ @@ -122,7 +123,9 @@
<Compile Include="Src\UnitTestCommands.cs" />
<Compile Include="Src\TestableCondition.cs" />
<Compile Include="Src\RunningTestsCondition.cs" />
<Compile Include="Src\TestTreeView.cs" />
<Compile Include="Src\TestTreeView.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Src\NUnitConsoleCommandLine.cs" />
<Compile Include="Src\AbstractRunTestCommand.cs" />
<Compile Include="Configuration\AssemblyInfo.cs" />
@ -141,7 +144,9 @@ @@ -141,7 +144,9 @@
<Compile Include="Src\TestClassTreeNode.cs" />
<Compile Include="Src\TestMemberTreeNode.cs" />
<Compile Include="Src\UnitTestingOptions.cs" />
<Compile Include="Src\UnitTestingOptionsPanel.cs" />
<Compile Include="Src\UnitTestingOptionsPanel.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Src\UnitTestsPad.cs" />
<EmbeddedResource Include="Resources\Red.png" />
<EmbeddedResource Include="Resources\Green.png" />
@ -171,7 +176,6 @@ @@ -171,7 +176,6 @@
<Name>ICSharpCode.Core</Name>
<Private>False</Private>
</ProjectReference>
<Folder Include="Configuration" />
<ProjectReference Include="..\..\..\Main\ICSharpCode.Core.WinForms\ICSharpCode.Core.WinForms.csproj">
<Project>{857CA1A3-FC88-4BE0-AB6A-D1EE772AB288}</Project>
<Name>ICSharpCode.Core.WinForms</Name>
@ -182,7 +186,6 @@ @@ -182,7 +186,6 @@
<Name>ICSharpCode.SharpDevelop.Dom</Name>
<Private>False</Private>
</ProjectReference>
<Folder Include="Resources" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" />
<Import Project="PostBuildEvent.proj" />

12
src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/PythonTestFramework.cs

@ -2,6 +2,8 @@ @@ -2,6 +2,8 @@
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
using System;
using System.Collections.Generic;
using System.Linq;
using ICSharpCode.SharpDevelop.Dom;
using ICSharpCode.SharpDevelop.Project;
using ICSharpCode.UnitTesting;
@ -14,11 +16,19 @@ namespace ICSharpCode.PythonBinding @@ -14,11 +16,19 @@ namespace ICSharpCode.PythonBinding
{
var method = member as IMethod;
if (method != null) {
return method.Name.StartsWith("test");
return IsTestMethod(method);
}
return false;
}
public IEnumerable<TestMember> GetTestMembersFor(IClass @class) {
return @class.Methods.Where(IsTestMethod).Select(method => new TestMember(method));
}
static bool IsTestMethod(IMethod method) {
return method.Name.StartsWith("test");
}
public bool IsTestClass(IClass c)
{
while (c != null) {

17
src/AddIns/BackendBindings/Ruby/RubyBinding/Project/Src/RubyTestFramework.cs

@ -2,6 +2,9 @@ @@ -2,6 +2,9 @@
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
using System;
using System.Collections.Generic;
using System.Linq;
using ICSharpCode.SharpDevelop.Dom;
using ICSharpCode.SharpDevelop.Project;
using ICSharpCode.UnitTesting;
@ -13,12 +16,20 @@ namespace ICSharpCode.RubyBinding @@ -13,12 +16,20 @@ namespace ICSharpCode.RubyBinding
public bool IsTestMember(IMember member)
{
var method = member as IMethod;
if (method != null) {
return method.Name.StartsWith("test");
}
if (method != null)
return IsTestMethod(method);
return false;
}
public IEnumerable<TestMember> GetTestMembersFor(IClass @class) {
return @class.Methods.Where(IsTestMethod).Select(method => new TestMember(method));
}
bool IsTestMethod(IMethod method)
{
return method.Name.StartsWith("test");
}
public bool IsTestClass(IClass c)
{
while (c != null) {

BIN
src/Tools/Machine.Specifications/CommandLine.dll

Binary file not shown.

54
src/Tools/Machine.Specifications/License.txt

@ -0,0 +1,54 @@ @@ -0,0 +1,54 @@
Copyright (c) 2008 Machine Project
Portions Copyright (c) 2008 Jacob Lewallen, Aaron Jensen
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*****************************
Some parts licensed under MS-PL
*****************************
This license governs use of the accompanying software. If you use the software, you accept this license. If you do not accept the license, do not use the software.
1. Definitions
The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning here as under U.S. copyright law.
A "contribution" is the original software, or any additions or changes to the software.
A "contributor" is any person that distributes its contribution under this license.
"Licensed patents" are a contributor's patent claims that read directly on its contribution.
2. Grant of Rights
(A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or any derivative works that you create.
(B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution in the software or derivative works of the contribution in the software.
3. Conditions and Limitations
(A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks.
(B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your patent license from such contributor to the software ends automatically.
(C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution notices that are present in the software.
(D) If you distribute any portion of the software in source code form, you may do so only under this license by including a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license.
(E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a particular purpose and non-infringement.

BIN
src/Tools/Machine.Specifications/Machine.Specifications.Reporting.dll

Binary file not shown.

BIN
src/Tools/Machine.Specifications/Machine.Specifications.dll

Binary file not shown.

BIN
src/Tools/Machine.Specifications/Spark.dll

Binary file not shown.

BIN
src/Tools/Machine.Specifications/mspec-clr4.exe

Binary file not shown.

BIN
src/Tools/Machine.Specifications/mspec-x86-clr4.exe

Binary file not shown.

BIN
src/Tools/Machine.Specifications/mspec-x86.exe

Binary file not shown.

BIN
src/Tools/Machine.Specifications/mspec.exe

Binary file not shown.
Loading…
Cancel
Save