Browse Source
Run tests just for the class or namespace selected. When a test member is selected run all tests for the associated class (mspec.exe cannot run a single test/specification).pull/32/merge
10 changed files with 56 additions and 91 deletions
@ -1,65 +0,0 @@
@@ -1,65 +0,0 @@
|
||||
//// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
|
||||
//// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
||||
//
|
||||
//using System;
|
||||
//using System.Collections.Generic;
|
||||
//using 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);
|
||||
// }
|
||||
//}
|
||||
@ -0,0 +1,12 @@
@@ -0,0 +1,12 @@
|
||||
// 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; |
||||
|
||||
namespace ICSharpCode.MachineSpecifications |
||||
{ |
||||
public interface ITestWithAssociatedType |
||||
{ |
||||
string GetTypeName(); |
||||
} |
||||
} |
||||
Loading…
Reference in new issue