public async Task GetActorTasksTestAsync(string mode) { var serviceContainer = new ServiceCollection(); var startUp = new Startup(); startUp.RegisterServices(serviceContainer); var serviceProvider = serviceContainer.BuildServiceProvider(); var botSettings = new BotSettings { Mode = mode }; var globeInitializer = serviceProvider.GetRequiredService <IGlobeInitializer>(); var player = serviceProvider.GetRequiredService <IPlayer>(); var autoPlayEngine = new AutoplayEngine( startUp, botSettings, globeInitializer); var globe = await autoPlayEngine.CreateGlobeAsync().ConfigureAwait(false); var followedPerson = player.MainPerson; PrintPersonBacklog(followedPerson); await autoPlayEngine.StartAsync(globe, followedPerson).ConfigureAwait(false); PrintResult(serviceProvider); }
public async Task GetActorTasksTestAsync(string mode) { var serviceContainer = new ServiceCollection(); var startUp = new Startup(); startUp.RegisterServices(serviceContainer); var serviceProvider = serviceContainer.BuildServiceProvider(); var botSettings = new BotSettings { Mode = mode }; var autoPlayEngine = new AutoplayEngine <HumanBotActorTaskSource>(startUp, botSettings); var startPerson = PersonCreateHelper.CreateStartPerson(serviceProvider); PrintPersonBacklog(startPerson); await autoPlayEngine.StartAsync(startPerson, serviceProvider).ConfigureAwait(false); PrintResult(serviceProvider); }