Exemplo n.º 1
0
        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);
        }
		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);
		}
Exemplo n.º 3
0
        void CreateAddInTree()
        {
            testFrameworkFactory = new MockTestFrameworkFactory();

            addinTree = new MockAddInTree();
            testFrameworkDescriptors = new List <TestFrameworkDescriptor>();
            addinTree.AddItems("/SharpDevelop/UnitTesting/TestFrameworks", testFrameworkDescriptors);
        }
		void CreateAddInTree()
		{
			testFrameworkFactory = new MockTestFrameworkFactory();
			
			addinTree = new MockAddInTree();
			testFrameworkDescriptors = new List<TestFrameworkDescriptor>();
			addinTree.AddItems("/SharpDevelop/UnitTesting/TestFrameworks", testFrameworkDescriptors);			
		}
		public void Init()
		{
			myItems = new List<string>();
			myItems.Add("a");
			myItems.Add("b");
			
			addinTree = new MockAddInTree();
			addinTree.AddItems("MyItems", myItems);
		}
        public void Init()
        {
            myItems = new List <string>();
            myItems.Add("a");
            myItems.Add("b");

            addinTree = new MockAddInTree();
            addinTree.AddItems("MyItems", myItems);
        }
Exemplo n.º 7
0
        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;
        }
Exemplo n.º 8
0
        public void Init()
        {
            MockCSharpProject project = new MockCSharpProject();
            SelectedTests     tests   = new SelectedTests(project);

            gallioEchoConsoleFileName = @"d:\gallio\bin\Gallio.Echo.exe";
            addinTreePath             = GallioEchoConsoleApplicationFactory.AddInTreePath;

            addinTree = new MockAddInTree();
            List <string> items = new List <string>();

            items.Add(gallioEchoConsoleFileName);

            addinTree.AddItems <string>(addinTreePath, items);

            GallioEchoConsoleApplicationFactory factory = new GallioEchoConsoleApplicationFactory(addinTree);

            app = factory.Create(tests);
        }
		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;
		}
Exemplo n.º 10
0
        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);
        }
        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);
        }