public void Setup()
        {
            this.mocks = new MockRepository();

            mockery = new Mockery();
            targetMock = mockery.NewDynamicMock(typeof(IIntegrationRunnerTarget));
            resultManagerMock = mockery.NewDynamicMock(typeof(IIntegrationResultManager));
            quietPeriodMock = mockery.NewDynamicMock(typeof(IQuietPeriod));

            runner = new IntegrationRunner((IIntegrationResultManager)resultManagerMock.MockInstance,
                                           (IIntegrationRunnerTarget)targetMock.MockInstance,
                                           (IQuietPeriod)quietPeriodMock.MockInstance);


            request = ModificationExistRequest();
            endTime = new DateTime(2005, 2, 1);
            modifications = new Modification[] { new Modification() };

            resultMock = mockery.NewDynamicMock(typeof(IIntegrationResult));
            resultMock.SetupResult("WorkingDirectory", TempFileUtil.GetTempPath("workingDir"));
            resultMock.SetupResult("ArtifactDirectory", TempFileUtil.GetTempPath("artifactDir"));
            resultMock.SetupResult("BuildProgressInformation", new ThoughtWorks.CruiseControl.Core.Util.BuildProgressInformation("",string.Empty));
            resultMock.SetupResult("IntegrationProperties", new Dictionary<string, string>());
            result = (IIntegrationResult)resultMock.MockInstance;

            lastResultMock = mockery.NewDynamicMock(typeof(IIntegrationResult));
            lastResult = (IIntegrationResult)lastResultMock.MockInstance;
        }
Пример #2
0
		public void SetUp()
		{
            this.mocks = new MockRepository();
            workingDirPath = TempFileUtil.CreateTempDir("workingDir");
			artifactDirPath = TempFileUtil.CreateTempDir("artifactDir");
			Assert.IsTrue(Directory.Exists(workingDirPath));
			Assert.IsTrue(Directory.Exists(artifactDirPath));
			queue = new IntegrationQueue("foo", new DefaultQueueConfiguration("foo"), null);
			mockery = new Mockery();
			mockSourceControl = mockery.NewStrictMock(typeof (ISourceControl));
			mockStateManager = mockery.NewStrictMock(typeof (IStateManager));
			mockTrigger = mockery.NewStrictMock(typeof (ITrigger));
			mockLabeller = mockery.NewStrictMock(typeof (ILabeller));
			mockPublisher = mockery.NewStrictMock((typeof (ITask)));
			mockTask = mockery.NewStrictMock((typeof (ITask)));

			project = new Project();
			SetupProject();
		}
        public void SetUp()
        {
            workingDirPath = TempFileUtil.CreateTempDir("workingDirectory");
            artifactDirPath = TempFileUtil.CreateTempDir("artifactDirectory");
            Assert.IsTrue(Directory.Exists(workingDirPath));
            Assert.IsTrue(Directory.Exists(artifactDirPath));

            mockery = new Mockery();
            mockSourceControl = mockery.NewStrictMock(typeof (ISourceControl));
            mockStateManager = mockery.NewStrictMock(typeof (IStateManager));
            mockTrigger = mockery.NewStrictMock(typeof (ITrigger));
            mockLabeller = mockery.NewStrictMock(typeof (ILabeller));
            mockPublisher = mockery.NewStrictMock((typeof (ITask)));
            mockTask = mockery.NewStrictMock((typeof (ITask)));

            project1 = new Project();
            project2 = new Project();
            SetupProjects();
        }