Ejemplo n.º 1
0
        public void IgnoreNegativeDeposits(int bits)
        {
            int balance = _bank.Deposit(_user, 100);
            int result  = _bank.Deposit(_user, bits);

            result.Should().Be(balance);
        }
Ejemplo n.º 2
0
        private static (MenuCommand, ChatUser) SetUpTest(int bits = 0, bool isMod = false)
        {
            var twitchClient = new Mock <ITwitchClient>();
            var logger       = new Mock <ILogger <ColorPaletteCollection> >();
            var gilBank      = new GilBank(new TestMemoryDataStore(new List <Account>()));
            var chatUser     = new ChatUser {
                IsMod = isMod, Username = Guid.NewGuid().ToString()
            };

            gilBank.Deposit(chatUser, bits);
            var menuCommand = new MenuCommand(new ColorPaletteCollection(logger.Object), new PaymentProcessor(gilBank, twitchClient.Object));

            return(menuCommand, chatUser);
        }
        SetUpTest(int gil, params string[] args)
        {
            var eqAccessor   = new Mock <IEquipmentAccessor>();
            var itemAccessor = new Mock <IInventoryAccessor>();
            var chat         = new Mock <ITwitchClient>();
            var gilBank      = new GilBank(new TestMemoryDataStore(new List <Account>()));
            var chatUser     = new ChatUser {
                Username = "******"
            };

            gilBank.Deposit(chatUser, gil);
            var commandData = new CommandData
            {
                User      = chatUser,
                Arguments = args.ToList()
            };

            return(commandData, gilBank, eqAccessor, itemAccessor, chat);
        }