private static void AddInstitutions(AnabiContext context) { var result = InstitutionImporter.Deserialize(); var institutions = result.Select(i => new InstitutionDb { BusinessId = i.Id, Name = i.Name, AddedDate = DateTime.Now, UserCodeAdd = "admin" }).ToList(); context.Institutions.AddRange(institutions); context.SaveChanges(); }
public void ShouldFind_A_Court() { var result = InstitutionImporter.Deserialize();; var expected = new List <Institution> { new Institution() { Id = 107, Name = "Tribunalul ALBA" } }; var actual = result.Where(i => i.Id == 107); actual.FirstOrDefault() .Should() .BeEquivalentTo(expected.FirstOrDefault()); }
public void ListOfInstitutionsShouldBeNotEmpty() { var result = InstitutionImporter.Deserialize();; Assert.True(result.Count > 0); }
public void ShouldBeNotNull() { var result = InstitutionImporter.Deserialize(); Assert.NotNull(result); }