예제 #1
0
        public void PartyRepository_GetByIds()
        {
            PartyRepository sut = new PartyRepository();

            IReadOnlyList <Party> result = sut.GetByIds(new int[] { 8, 15 });

            Assert.Multiple(() =>
            {
                Assert.AreEqual(8, result.First().Id);
                Assert.AreEqual(15, result.Last().Id);
            });
        }
        private Dictionary <int, string> GetPartiesDictionary(List <int> ids)
        {
            IReadOnlyList <Party> result = PartyRepository.GetByIds(ids).ToList();

            return(result.ToDictionary(p => p.Id, p => p.Name));
        }