Beispiel #1
0
        public async Task should_call_find_on_collection_returning_all_results()
        {
            var result = await ExecuteEndpoint(_controller.Get());

            Repository.Verify(x => x.Find(CertCollectionName, It.IsAny <FilterDefinition <Certification> >()));
            result.Should().HaveCount(25);
            _findCursor.Verify(x => x.Skip(0));
            _findCursor.Verify(x => x.Limit(100));
        }
        public void getCertification()
        {
            // Arrange
            CertificationController controller = new CertificationController();

            var actResult = controller.Get(1);
            // Act
            var result = actResult as OkNegotiatedContentResult <Certification>;

            // Assert
            Assert.IsNotNull(result);
            Assert.IsTrue(result.Content.ID == 1);
        }