public void CanUsePrivilege()
        {
            var action = new BonusProduction {
                GoodType = GoodType.Corn
            };
            var plantation = new CornPlantation();

            plantation.AddWorker(new Colonist());
            RoleOwner.Plant(plantation);

            ReselectRole();
            CanExecuteActionOnce(action, RoleOwner);
        }
Exemplo n.º 2
0
        public Task AddTodoListAsync(TodoList todoList, Guid accountId)
        {
            _context.TodoLists.Add(todoList);
            var accountLists = new RoleOwner()
            {
                Id        = _idGenerator.NextId(),
                AccountId = accountId,
                ListId    = todoList.Id,
            };

            accountLists.Owned();

            _context.AccountsLists.Add(accountLists);
            return(Task.CompletedTask);
        }
Exemplo n.º 3
0
        public void CanUseUniversity()
        {
            RoleOwner.Doubloons = 21;
            var university = new University();

            university.AddWorker(new Colonist());
            RoleOwner.Build(university);

            var building = Game.Buildings.First();
            var action   = new Build {
                BuildingIndex = 0,
            };

            Role.Execute(action, RoleOwner);

            Assert.Single(building.Workers);
        }