Example #1
0
 public FSRepositoryReferenceBuilder(Suite suite, IFSRepositoryFingerprintFactory fingerprintFactory, IFileSystemRepositoryAccess repository, [TargetRoot] IFileSystemDirectory targetRoot, IUserOutput output)
 {
     this.suite = suite;
     this.fingerprintFactory = fingerprintFactory;
     this.repository         = repository;
     this.targetRoot         = targetRoot;
     this.output             = output;
 }
Example #2
0
        public FSRepositoryFingerprint(IFileSystemRepositoryAccess repository, string path)
        {
            Contract.Requires(repository != null);
            Contract.Requires(path != null);

            this.path = path;

            var dir      = repository.GetDirectory(path);
            var fileName = Path.GetFileName(path);

            lastModifiedDate = dir.GetLastModifiedDate(fileName);
            lastSize         = dir.GetFileSize(fileName);
        }
Example #3
0
        public void SetUp()
        {
            kernel = new StandardKernel();
            Kernel.RegisterCoreBindings(kernel);
            kernel.Bind <IFileSystemDirectory>().ToConstant(new TestFileSystemDirectory("root")).WhenTargetHas
            <SuiteRootAttribute>();
            kernel.Bind <IFileSystemDirectory>().ToConstant(new TestFileSystemDirectory("target")).WhenTargetHas <TargetRootAttribute>();
            kernel.Bind <Lazy <IFileSystemDirectory> >().ToConstant(new Lazy <IFileSystemDirectory>(() => new TestFileSystemDirectory("cache"))).WhenTargetHas <CacheRootAttribute>();
            kernel.Bind <IUserOutput>().To <TestUserOutput>();

            parameters = new Mock <IParameters>();
            parameters.SetupGet(p => p.Goal).Returns("debug");
            kernel.Bind <IParameters>().ToConstant(parameters.Object);
            TestSetup.EnsureFactoryExtensionLoaded(kernel);

            kernel.Rebind <ISuiteFactory>().To <DefaultSuiteFactory>().InTransientScope();

            fsAccess = new Mock <IFileSystemRepositoryAccess>().Object;
            kernel.Bind <IFileSystemRepositoryAccess>().ToConstant(fsAccess);
            kernel.Bind <IYamlProjectParametersLoader>().To <YamlRepositoryPatternCollectionLoader>();
        }
        public void SetUp()
        {
            kernel = new StandardKernel();
            Kernel.RegisterCoreBindings(kernel);
            kernel.Bind<IFileSystemDirectory>().ToConstant(new TestFileSystemDirectory("root")).WhenTargetHas
                <SuiteRootAttribute>();
            kernel.Bind<IFileSystemDirectory>().ToConstant(new TestFileSystemDirectory("target")).WhenTargetHas<TargetRootAttribute>();
            kernel.Bind<IFileSystemDirectory>().ToConstant(new TestFileSystemDirectory("cache")).WhenTargetHas<CacheRootAttribute>();
            kernel.Bind<IUserOutput>().To<TestUserOutput>();

            parameters = new Mock<IParameters>();
            parameters.SetupGet(p => p.Goal).Returns("debug");
            kernel.Bind<IParameters>().ToConstant(parameters.Object);
            TestSetup.EnsureFactoryExtensionLoaded(kernel);
            
            kernel.Rebind<ISuiteFactory>().To<DefaultSuiteFactory>().InTransientScope();

            fsAccess = new Mock<IFileSystemRepositoryAccess>().Object;
            kernel.Bind<IFileSystemRepositoryAccess>().ToConstant(fsAccess);
            kernel.Bind<IYamlProjectParametersLoader>().To<YamlRepositoryPatternCollectionLoader>();
        }
Example #5
0
 public YamlRepositoryPatternCollectionLoader(IFileSystemRepositoryAccess fsAccess)
 {
     this.fsAccess = fsAccess;
 }
        public RepositoryPatternCollection(IFileSystemRepositoryAccess fsAccess)
        {
            Contract.Requires(fsAccess != null);

            this.fsAccess = fsAccess;
        }
Example #7
0
        public RepositoryPatternCollection(IFileSystemRepositoryAccess fsAccess)
        {
            Contract.Requires(fsAccess != null);

            this.fsAccess = fsAccess;
        }
Example #8
0
 /// <summary>
 /// Constructs the dependency object
 /// </summary>
 /// <param name="fingerprintFactory">The interface to create new fingerprint instances</param>
 /// <param name="repository">The interface to access the file system based repository</param>
 /// <param name="path">Resolved path of the dependency</param>
 public FSRepositoryReferenceDependencies(IFSRepositoryFingerprintFactory fingerprintFactory, IFileSystemRepositoryAccess repository, string path)
 {
     this.fingerprintFactory = fingerprintFactory;
     this.repository         = repository;
     this.path = path;
 }
 /// <summary>
 /// Constructs the dependency object
 /// </summary>
 /// <param name="fingerprintFactory">The interface to create new fingerprint instances</param>
 /// <param name="repository">The interface to access the file system based repository</param>
 /// <param name="path">Resolved path of the dependency</param>
 public FSRepositoryReferenceDependencies(IFSRepositoryFingerprintFactory fingerprintFactory, IFileSystemRepositoryAccess repository, string path)
 {
     this.fingerprintFactory = fingerprintFactory;
     this.repository = repository;
     this.path = path;
 }
Example #10
0
 public YamlRepositoryPatternCollectionLoader(IFileSystemRepositoryAccess fsAccess, IUserOutput output) : base(output)
 {
     this.fsAccess = fsAccess;
 }