Exemplo n.º 1
0
        public async Task GetByNameAsync_WhenSectionExists_ThenReturnsSectionByName()
        {
            Section section = new Section {
                ID = Guid.NewGuid(), Name = "Test Name"
            };

            sectionRepository.Upsert(section);
            dbContext.SaveChanges();

            Section dbSection = await sectionRepository.GetByNameAsync(section.Name);

            AssertSectionEqual(section, dbSection);
        }