public void SetUp() { DbContextOptions <DatabaseConnection> options = new DbContextOptionsBuilder <DatabaseConnection>() .UseInMemoryDatabase(databaseName: "CommentRepository") .Options; DatabaseConnection db = new DatabaseConnection(options); IEntityRepository <CommentEntity> entityRepo = new GenericRepository <CommentEntity>(db); commentsRepo = new CommentRepository(entityRepo); User user = new Mock <User>("aName", "asurname", "aUsername", "aPassword", "*****@*****.**").Object; comment = new Commentary(4, "this is a comment", user); commentsRepo.Clear(); //Mock<Team> home = new Mock<Team>(3,"River Plate", "aPath"); //Mock<Team> away = new Mock<Team>(3, "Boca Juniors", "aPath"); //match = new Mock<BusinessLogic.Match>(home.Object, away.Object); }