コード例 #1
0
        public void GetAll_Returns_EmptyList()
        {
            var dal = new EntrantDal();

            var items = dal.GetAll();

            Assert.That(items, Is.Empty);
        }
コード例 #2
0
        public void GetAll_Returns_ExpectEntrants()
        {
            var entrantMap = new ConcurrentDictionary <int, Entrant>
            {
                [1] = new Entrant {
                    FirstName = "firstName", LastName = "lastName", Id = 1
                },
                [2] = new Entrant {
                    FirstName = "firstName2", LastName = "lastName2", Id = 2
                },
            };

            var dal = new EntrantDal(entrantMap);

            var items = dal.GetAll();

            Assert.That(items, Is.EquivalentTo(entrantMap.Values.ToList()));
        }