public async Task Selects_All_SubCategories() { // Arrange const int expected = 2; using (var context = new DueltankDbContext(_dbContextOptions)) { context.Category.Add(new Category { Name = "Monster", Created = DateTime.UtcNow, Updated = DateTime.UtcNow, SubCategory = new List <SubCategory> { new SubCategory { Name = "SpellCaster", Created = DateTime.UtcNow, Updated = DateTime.UtcNow }, new SubCategory { Name = "Insect", Created = DateTime.UtcNow, Updated = DateTime.UtcNow } } }); context.SaveChanges(); } // Act var result = await _sut.AllSubCategories(); // Assert result.Count.Should().Be(expected); }