Пример #1
0
        public GivenOpenState()
        {
            TwitchChat = new Mock <IChatService>();

            _MockClientFactory = _MockHandler.CreateClientFactory();

            _Game = new CORE.GiveawayGame(_MockClientFactory, Options.Create(Config));
            _Cmd  = new GiveawayGameCommand(_Game, new Mock <IConfiguration>().Object)
            {
                ChatUser = new ChatUser {
                    IsBroadcaster = true
                }
            };
        }
Пример #2
0
        public GivenOpenState()
        {
            TwitchChat = new Mock <IChatService>();

            _MockClientFactory = new Mock <IHttpClientFactory>();
            _MockClient        = new Mock <HttpClient>();
            _MockClientFactory.Setup(_ => _.CreateClient(It.IsAny <string>())).Returns(_MockClient.Object);

            _Game = new CORE.GiveawayGame(_MockClientFactory.Object, Options.Create(Config));
            _Cmd  = new GiveawayGameCommand(_Game, new Mock <IConfiguration>().Object)
            {
                ChatUser = new ChatUser {
                    IsBroadcaster = true
                }
            };
        }