Example #1
0
        public void SetUp()
        {
            AppCommandLine commandLine = new AppCommandLine
            {
                MachineID   = "Test01",
                Environment = GetType().FullName,
                GameConfig  = "Tests/AppFlow/app-flow.json"
            };
            IServiceProvider serviceProvider = new AppFlowStartup().ConfigureServices(commandLine);

            _scope               = serviceProvider.CreateScope();
            _gameEngine          = _scope.ServiceProvider.GetRequiredService <AppFlowGameEngine>();
            _recordedNumbers     = _scope.ServiceProvider.GetRequiredService <RecordedRandomNumberGenerator>();
            _recordedInteraction = _scope.ServiceProvider.GetRequiredService <RecordedInteraction>();
        }
        public void OneTimeSetUp()
        {
            AppCommandLine commandLine = new AppCommandLine
            {
                MachineID   = "Test01",
                Environment = GetType().FullName,
                GameConfig  = "Tests/Spinning/single-row.json"
            };
            IServiceProvider serviceProvider = new SpinningStartup().ConfigureServices(commandLine);

            _scope           = serviceProvider.CreateScope();
            _spin            = _scope.ServiceProvider.GetRequiredService <Spin>();
            _recordedNumbers = _scope.ServiceProvider.GetRequiredService <RecordedRandomNumberGenerator>();

            _spin.PrepareSymbols();
        }