public async Task GetAllDocuments_ReturnsAbstractedEntitiesWithoutTablePrefix()
        {
            //Arrange
            var students = new List <Student>
            {
                new Student("John Smith")
                {
                    GPA = 3.75, Id = nameof(Student) + "|" + "John Smith"
                },
                new Student("Tim Smith")
                {
                    GPA = 3.65, Id = nameof(Student) + "|" + "Tim Smith"
                }
            };

            var mongoDbCollectionMock = new Mock <IMongoDbCollection <Student> >();

            mongoDbCollectionMock.Setup(a => a.FindAsync(It.IsAny <Expression <Func <Student, bool> > >()))
            .ReturnsAsync(students);

            IRepository <Student> repo = new MongoDbRepo <Student>(mongoDbCollectionMock.Object);

            //Act
            var studentsFromDb = await repo.GetAllAsync();

            //Assert
            Assert.Equal(2, studentsFromDb.Count);
            Assert.True(studentsFromDb.All(a => !a.Id.StartsWith(nameof(Student))));
        }
        public async Task GetAllDocuments_GetsAllTheDocuments()
        {
            //Arrange
            var students = new List <Student>
            {
                new Student("John Smith")
                {
                    GPA = 3.75, Id = nameof(Student) + "|" + "John Smith"
                },
                new Student("Tim Smith")
                {
                    GPA = 3.65, Id = nameof(Student) + "|" + "Tim Smith"
                }
            };

            var mongoDbCollectionMock = new Mock <IMongoDbCollection <Student> >();

            mongoDbCollectionMock.Setup(a => a.FindAsync(It.IsAny <Expression <Func <Student, bool> > >()))
            .ReturnsAsync(students);

            IRepository <Student> repo = new MongoDbRepo <Student>(mongoDbCollectionMock.Object);

            //Act
            var studentsFromDb = await repo.GetAllAsync();

            //Assert
            Assert.Equal(2, studentsFromDb.Count);
        }