Ejemplo n.º 1
0
        public async Task GivenCollectionNameAndId_WhenDelete_ThenDeleteSuccessful()
        {
            //?Given
            var collectionName = "Survey";
            var id             = "1234";
            var record         = new SurveyEntity();

            SetupGetCollections(collectionName);

            _mockCollection.Setup(x => x.DeleteOneAsync(It.IsAny <FilterDefinition <SurveyEntity> >(), It.IsAny <CancellationToken>()))
            .Verifiable();

            //?When
            await _mongoService.Delete <SurveyEntity>(collectionName, id);

            //?Then
            _mockClient.VerifyAll();
            _mockCollection.VerifyAll();
        }
Ejemplo n.º 2
0
 public Task Delete(string id)
 {
     return(_mogoService.Delete <ProductEntity>(_collectionName, id));
 }
Ejemplo n.º 3
0
 public async Task Delete(string id)
 {
     await _service.Delete <SurveyEntity>(_collectionName, id);
 }
Ejemplo n.º 4
0
 public Task Delete(string id)
 {
     return(_mongoService.Delete <CategoryEntity>(_collectionName, id));
 }