public void Init()
		{
			MockCSharpProject project = new MockCSharpProject();
			NUnitTestProject testProject = new NUnitTestProject(project);
			NUnitConsoleApplication app = new NUnitConsoleApplication(new[] { testProject });
			
			info = app.GetProcessStartInfo();
		}
		public override void FixtureSetUp()
		{
			base.FixtureSetUp();
			SD.Services.AddService(typeof(IBookmarkManager), MockRepository.GenerateStub<IBookmarkManager>());
			SD.Services.AddService(typeof(IProjectService), MockRepository.GenerateStub<IProjectService>());
			project = MockRepository.GenerateStub<IProject>();
			testProject = new NUnitTestProject(project);
		}
		void CreateNUnitConsoleApplication()
		{
			project = new MockCSharpProject();
			project.FileName = FileName.Create(@"c:\projects\MyTests\MyTests.csproj");
			
			var testProject = new NUnitTestProject(project);
			options = new UnitTestingOptions(new Properties());
			nunitConsoleApp = new NUnitConsoleApplication(new [] { testProject }, options);
		}
Example #4
0
		public NUnitTestClass(NUnitTestProject parentProject, FullTypeName fullTypeName)
		{
			if (parentProject == null)
				throw new ArgumentNullException("parentProject");
			this.parentProject = parentProject;
			this.fullTypeName = fullTypeName;
			BindResultToCompositeResultOfNestedTests();
			// No need to call UpdateTestClass() here as NestedTestsInitialized still is false
		}
		public void SetUp()
		{
			project = new MockCSharpProject();
			project.FileName = FileName.Create(@"C:\Projects\MyTests\MyTests.csproj");
			project.AssemblyName = "MyTests";
			project.OutputType = OutputType.Library;
			project.SetProperty("OutputPath", null);
			
			testProject = new NUnitTestProject(project);
		}
		public virtual void SetUp()
		{
			SD.InitializeForUnitTests();
			project = MockRepository.GenerateStrictMock<IProject>();
			project.Stub(p => p.RootNamespace).Return("RootNamespace");
			testProject = new NUnitTestProject(project);
			projectContent = new CSharpProjectContent().AddAssemblyReferences(NRefactoryHelper.Corlib, NRefactoryHelper.NUnitFramework);
			
			SD.Services.AddStrictMockService<IParserService>();
			SD.ParserService.Stub(p => p.GetCompilation(project)).WhenCalled(m => m.ReturnValue = projectContent.CreateCompilation());
		}
 public NUnitTestClass(NUnitTestProject parentProject, FullTypeName fullTypeName)
 {
     if (parentProject == null)
     {
         throw new ArgumentNullException("parentProject");
     }
     this.parentProject = parentProject;
     this.fullTypeName  = fullTypeName;
     BindResultToCompositeResultOfNestedTests();
     // No need to call UpdateTestClass() here as NestedTestsInitialized still is false
 }
		public void SetUp()
		{
			project = new MockCSharpProject();
			testProject = new NUnitTestProject(project);
		}
		public void NotMSBuildBasedProject()
		{
			ProjectLoadInformation info = new ProjectLoadInformation(MockSolution.Create(), FileName.Create(@"C:\Projects\Test.proj"), "Test");
			
			MissingProject project = new MissingProject(info);
			ITestProject testProject = new NUnitTestProject(project);
			NUnitConsoleApplication app = new NUnitConsoleApplication(new[] { testProject });
			
			Assert.AreEqual(project.GetType().BaseType, typeof(AbstractProject), "MissingProject should be derived from AbstractProject.");
			Assert.AreEqual(@"D:\SharpDevelop\bin\Tools\NUnit\nunit-console.exe", app.FileName);
		}