public async void AddItemsSuccess() { var item = new DatabaseModel.Item("assetId1", _setup.ItemDescription2.Id, _setup.Bot1.Id, _setup.User1.Id, DateTimeOffset.Now); var itemId = await _itemRepoService.InsertAsync(item); var item2 = new DatabaseModel.Item("assetId2", _setup.ItemDescription2.Id, _setup.Bot1.Id, _setup.User1.Id, DateTimeOffset.Now); var itemId2 = await _itemRepoService.InsertAsync(item2); Assert.NotEqual(itemId, itemId2); }
public async Task InitTest() { var userRepoService = new UserRepoService(DatabaseConnectionFactory, new UserQueries()); var matchRepoService = new MatchRepoService(DatabaseConnectionFactory, new MatchQueries()); var betRepoService = new BetRepoService(DatabaseConnectionFactory, new BetQueries()); var itemRepoService = new ItemRepoService(DatabaseConnectionFactory, new ItemQueries()); GameMode = new DatabaseModel.GameMode("Jackpot", 1); await new GameModeRepoService(DatabaseConnectionFactory).Insert(GameMode); User1 = await userRepoService.InsertAsync(new DatabaseModel.User( "987654321", "Kalle", " ba/bab154f01140ec39b2986d97838f0127534ec82d_full.jpg ", "?partner=117688384&token=mn347bmb ", DateTime.Now, DateTime.Now, false )); User2 = await userRepoService.InsertAsync(new DatabaseModel.User( "4477654321", "Kalle", " ba/bab154f01140ec39b2986d97838f0127534ec82d_full.jpg ", "?partner=117688384&token=mn347bmb ", DateTime.Now, DateTime.Now, false )); User3 = await userRepoService.InsertAsync(new DatabaseModel.User( "444784", "Kalle", " ba/bab154f01140ec39b2986d97838f0127534ec82d_full.jpg ", "?partner=117688384&token=mn347bmb ", DateTime.Now, DateTime.Now, false )); Match1 = await matchRepoService.InsertAsync(new DatabaseModel.Match( 11, "salt", "hash", 47.5484.ToString(CultureInfo.InvariantCulture), 1, null, null, 1, GameMode.Id, DateTime.Now )); Match2 = await matchRepoService.InsertAsync(new DatabaseModel.Match( 101, "salt", "hash", 47.5484.ToString(CultureInfo.InvariantCulture), 1, null, null, 1, GameMode.Id, DateTime.Now )); var model1 = new DatabaseModel.ItemDescription("itemDescription itembet 2", new decimal(13.37), "730", "2", "imageUrl", true); var model2 = new DatabaseModel.ItemDescription("itemDescription itembet 1", new decimal(13.37), "730", "2", "imageUrl", true); var itemDescriptionRepoService = new ItemDescriptionRepoService(DatabaseConnectionFactory, new ItemDescriptionQueries()); BotId = await new BotRepoService(DatabaseConnectionFactory, new BotQueries()).InsertAsync(new DatabaseModel.Bot("47489", "Bot ItemBet")); ItemDescription1 = await itemDescriptionRepoService.InsertAsync(model2); ItemDescription2 = await itemDescriptionRepoService.InsertAsync(model1); Item1 = await itemRepoService.InsertAsync(new DatabaseModel.Item("itemBet 1", ItemDescription1.Id, BotId.Id, User1.Id, DateTimeOffset.Now)); Item2 = await itemRepoService.InsertAsync(new DatabaseModel.Item("itemBet 2", ItemDescription1.Id, BotId.Id, User1.Id, DateTimeOffset.Now)); Item3 = await itemRepoService.InsertAsync(new DatabaseModel.Item("itemBet 3", ItemDescription2.Id, BotId.Id, User1.Id, DateTimeOffset.Now)); Item4 = await itemRepoService.InsertAsync(new DatabaseModel.Item("itemBet 4", ItemDescription1.Id, BotId.Id, User1.Id, DateTimeOffset.Now)); Item5 = await itemRepoService.InsertAsync(new DatabaseModel.Item("itemBet 5", ItemDescription2.Id, BotId.Id, User1.Id, DateTimeOffset.Now)); Item6 = await itemRepoService.InsertAsync(new DatabaseModel.Item("itemBet 6", ItemDescription1.Id, BotId.Id, User2.Id, DateTimeOffset.Now)); Item7 = await itemRepoService.InsertAsync(new DatabaseModel.Item("itemBet 7", ItemDescription2.Id, BotId.Id, User2.Id, DateTimeOffset.Now)); Item8 = await itemRepoService.InsertAsync(new DatabaseModel.Item("itemBet 8", ItemDescription1.Id, BotId.Id, User2.Id, DateTimeOffset.Now)); Item9 = await itemRepoService.InsertAsync(new DatabaseModel.Item("itemBet 9", ItemDescription1.Id, BotId.Id, User2.Id, DateTimeOffset.Now)); Item10 = await itemRepoService.InsertAsync(new DatabaseModel.Item("itemBet 10", ItemDescription1.Id, BotId.Id, User2.Id, DateTimeOffset.Now)); Item11 = await itemRepoService.InsertAsync(new DatabaseModel.Item("itemBet 11", ItemDescription1.Id, BotId.Id, User2.Id, DateTimeOffset.Now)); Item12 = await itemRepoService.InsertAsync(new DatabaseModel.Item("itemBet 12", ItemDescription1.Id, BotId.Id, User2.Id, DateTimeOffset.Now)); Item13 = await itemRepoService.InsertAsync(new DatabaseModel.Item("itemBet 13", ItemDescription1.Id, BotId.Id, User2.Id, DateTimeOffset.Now)); Item14 = await itemRepoService.InsertAsync(new DatabaseModel.Item("itemBet 14", ItemDescription1.Id, BotId.Id, User2.Id, DateTimeOffset.Now)); Item15 = await itemRepoService.InsertAsync(new DatabaseModel.Item("itemBet 15", ItemDescription1.Id, BotId.Id, User2.Id, DateTimeOffset.Now)); Bet1 = await betRepoService.InsertAsync(new DatabaseModel.Bet(User1.Id, Match1.Id, GameMode.Id, DateTime.Now)); Bet2 = await betRepoService.InsertAsync(new DatabaseModel.Bet(User2.Id, Match1.Id, GameMode.Id, DateTime.Now)); Bet3 = await betRepoService.InsertAsync(new DatabaseModel.Bet(User3.Id, Match1.Id, GameMode.Id, DateTime.Now)); Bet4 = await betRepoService.InsertAsync(new DatabaseModel.Bet(User3.Id, Match2.Id, GameMode.Id, DateTime.Now)); Bet5 = await betRepoService.InsertAsync(new DatabaseModel.Bet(User1.Id, Match2.Id, GameMode.Id, DateTime.Now)); }