Exemple #1
0
        public SplitterPerTaskHoursTests()
        {
            this.contractRegistry = new ContractRegistry();
            var tokenTagger = new FungibleTokenTagger();
            var tokenPicker = new FungibleTokenPicker();

            this.permissionManager = new ContractExecutor(this.addressFactory.Create());
            this.workTracker       = new WorkTracker.WorkTracker(this.addressFactory.Create(), this.contractRegistry,
                                                                 this.permissionManager.Address);
            this.tokenManager = new TokenManager(
                this.addressFactory.Create(),
                this.permissionManager.Address,
                this.contractRegistry,
                tokenTagger,
                tokenPicker);
            this.splitterPerHours =
                new SplitterPerTaskHoursMock(this.addressFactory.Create(), this.tokenManager.Address, this.workTracker);
            this.taskRegistry = new TaskRegistry(this.addressFactory.Create(), this.contractRegistry,
                                                 this.permissionManager.Address, this.splitterPerHours.Address);
            this.contractRegistry.RegisterContract(this.taskRegistry);
            this.contractRegistry.RegisterContract(this.permissionManager);
            this.contractRegistry.RegisterContract(this.tokenManager);
            this.contractRegistry.RegisterContract(this.workTracker);
            this.contractRegistry.RegisterContract(this.splitterPerHours);
            this.InitializePermissions();
        }
        public TaskTest()
        {
            this.contractRegistry = new ContractRegistry();
            var tokenTagger = new FungibleTokenTagger();
            var tokenPicker = new FungibleTokenPicker();

            this.permissionManager = new ContractExecutor(this.addressFactory.Create());
            this.tokenManager      = new TokenManager(
                this.addressFactory.Create(),
                this.permissionManager.Address,
                this.contractRegistry,
                tokenTagger,
                tokenPicker);
            this.contractRegistry.RegisterContract(this.permissionManager);
            this.contractRegistry.RegisterContract(this.tokenManager);
        }