public async Task UpdateGroups_PortraitDefinitionExists_Success()
        {
            var settingsRepo           = new PersonalSettingsRepository(MongoClient);
            var portraitRepo           = new PortraitRepository(MongoClient);
            var playeRepo              = new PlayerRepository(MongoClient);
            var portraitCommandHandler = new PortraitCommandHandler(settingsRepo, playeRepo, portraitRepo);

            int[]    portraitIds    = { 1, 2, 3, 4 };
            string[] portraitGroups = { "brozne", "silver" };
            var      defineCommand  = CreatePortraitsDefinitionCommand(portraitIds.ToList(), portraitGroups.ToList());
            await portraitCommandHandler.AddPortraitDefinition(defineCommand);

            int[]    portraitsToUpdate     = { 1, 4 };
            string[] portraitGroupToUpdate = { "gold" };
            var      updateCommand         = CreatePortraitsDefinitionCommand(portraitsToUpdate.ToList(), portraitGroupToUpdate.ToList());
            await portraitCommandHandler.UpdatePortraitDefinition(updateCommand);

            var portraits = await portraitCommandHandler.GetPortraitDefinitions();

            var definitionsWithGold         = portraits.FindAll(x => x.Groups.Count() == 1);
            var definitionsWithBronzeSilver = portraits.FindAll(x => x.Groups.Count() == 2);

            Assert.AreEqual(4, portraits.Count());
            Assert.AreEqual(2, definitionsWithGold.Count());
            Assert.AreEqual(2, definitionsWithBronzeSilver.Count());
        }
        public async Task UpdateGroups_PortraitDefinitionDoesntExist_NoError()
        {
            var settingsRepo           = new PersonalSettingsRepository(MongoClient);
            var portraitRepo           = new PortraitRepository(MongoClient);
            var playeRepo              = new PlayerRepository(MongoClient);
            var portraitCommandHandler = new PortraitCommandHandler(settingsRepo, playeRepo, portraitRepo);

            int[]    portraitIds    = { 1, 2, 3, 4 };
            string[] portraitGroups = { "bronze", "silver" };
            var      defineCommand  = CreatePortraitsDefinitionCommand(portraitIds.ToList(), portraitGroups.ToList());
            await portraitCommandHandler.AddPortraitDefinition(defineCommand);

            int[]    portraitsToUpdate     = { 5 };
            string[] portraitGroupToUpdate = { "gold" };
            var      updateCommand         = CreatePortraitsDefinitionCommand(portraitsToUpdate.ToList(), portraitGroupToUpdate.ToList());
            await portraitCommandHandler.UpdatePortraitDefinition(updateCommand);

            var portraits = await portraitCommandHandler.GetPortraitDefinitions();

            Assert.AreEqual(4, portraits.Count());
        }