Пример #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();
        }
Пример #2
0
		public SplitterPerTaskHoursMock(
			Address address,
			Address tokenManager,
			WorkTracker.WorkTracker tracker,
			ISet<Address> recipients = null,
			IDictionary<Address, IDictionary<Address, decimal>> tasksAddressToHours = null)
			: base(address, tokenManager, tracker, recipients, tasksAddressToHours)
		{
		}
 public SplitterPerTaskHours(
     Address address,
     Address tokenManager,
     WorkTracker.WorkTracker tracker,
     ISet <Address> recipients = null,
     IDictionary <Address, IDictionary <Address, decimal> > tasksAddressToHours = null)
     : base(address, tokenManager, recipients)
 {
     new TaskWorkMediator(tracker, this.TrackWorkHours);
     this.TasksAddressToEmployeesHours =
         tasksAddressToHours ?? new SortedDictionary <Address, IDictionary <Address, decimal> >();
 }