예제 #1
0
        protected override void Before_each_spec()
        {
            textWriter = new StringWriter();

            var parser = new SwitchParser(textWriter, args);

            packageTree = TreeHelper.GetTempPackageTree();

            var dependencyResolver = CreateStub<IDependencyResolver>();

            sourceControl = new SourceControlDouble("http://someurl.com");

            dependencyResolver.Stub(x => x.Resolve<IBuildConfigReader>()).Return(new BooBuildConfigReader());

            dependencyResolver.Stub(x => x.Resolve<SVNSourceControl>()).Return(sourceControl);

            IoC.InitializeWith(dependencyResolver);

            get = MockRepository.GenerateStub<IGet>();

            get.Stub(x => x.From(sourceControl)).Return(get);

            get.Stub(x => x.ExportTo(packageTree)).Return(packageTree);

            packageBuilder = new PackageBuilderStub(get, MockRepository.GenerateStub<IProcessFactory>(), parser.CommandArguments);
        }
        protected override void Before_each_spec()
        {
            sourceControlDouble = new SourceControlDouble("http://www.someurlorsomething.com/");

            metaDataSynchroniser = new MetaDataSynchroniser(sourceControlDouble);

            packageTreeBase = new PackageTree(metaDataSynchroniser);
        }
예제 #3
0
        protected override void Before_each_spec()
        {
            base.Before_each_spec();

            sourceControl = new SourceControlDouble("http://localhost/horn");

            packageTree = new PackageTree(rootDirectory, null);

            fileSystemProvider = CreateStub<IFileSystemProvider>();
        }
예제 #4
0
        protected override void Because()
        {
            SourceControl.ClearDownLoadedPackages();

            var packageTree = TreeHelper.GetTempPackageTree().RetrievePackage(PackageTreeHelper.PackageWithRevision);

            sourceControl = new SourceControlDouble("http://someurl.com/");

            sourceControl.RetrieveSource(packageTree);
        }
예제 #5
0
        public static IBuildMetaData GetPackageTreeParts(List<Dependency> dependencies, List<string> cmds )
        {
            var buildEngine = new BuildEngineStub(new BuildToolStub(), null, dependencies);
            var sourceControl = new SourceControlDouble("http://someurl.com");
            var buildMetaData = new BuildMetaDataStub(buildEngine, sourceControl);

            buildMetaData.PrebuildCommandList.AddRange(cmds);

            return buildMetaData;
        }
예제 #6
0
 public static IBuildMetaData GetPackageTreeParts(List<Dependency> dependencies)
 {
     var buildEngine = new BuildEngineStub(new BuildToolStub(), null, dependencies);
     var sourceControl = new SourceControlDouble("http://someurl.com");
     return new BuildMetaDataStub(buildEngine, sourceControl);
 }