public void Arrange() { _repo = new DevTeamRepository(); _content = new DevTeam("ben", 1, true); _repo.AddContentToList(_content); }
protected override void OnModelCreating(ModelBuilder modelBuilder) { //IncludeExternalExtension.Register<AppDbContext>(); modelBuilder.Entity <Case>().Ignore(c => c.DevTeamAssigned); modelBuilder.Ignore <DevTeam>(); IncludeExternalExtension.Register <DevTeam>(DevTeamRepository.Items); DevTeamRepository.Load(); }
public void AddToList_ShouldGetNotNull() { //arrange --> setting up the playing field DevTeam content = new DevTeam(); content.TeamMember = ""; DevTeamRepository repository = new DevTeamRepository(); // act --> get/run the code we want to test repository.AddContentToList(content); DevTeam contentFromDirectory = repository.GetContentByName(""); // assert --> use the assert class to verify the expected outcome Assert.IsNotNull(contentFromDirectory); }