public void EnsurePeriodenExist_Should_Create_New_Entries_If_Not_Exist() { // Arrange using var context = new CompetentieAppFrontendContext(_options); var repository = new PeriodeRepository(context); // Act var result = repository.EnsurePeriodenExist(new List <Periode> { new Periode { PeriodeNummer = 5 } }); // Assert Assert.IsTrue(result.Any(id => id == 5)); }
public void EnsurePeriodenExist_Should_Return_Typeof_IEnumerable_Of_Long() { // Arrange using var context = new CompetentieAppFrontendContext(_options); var repository = new PeriodeRepository(context); // Act var result = repository.EnsurePeriodenExist(new List <Periode> { new Periode { PeriodeNummer = 1 } }); // Assert Assert.IsInstanceOfType(result, typeof(IEnumerable <long>)); }