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(); }
public Task Delete(string id) { return(_mogoService.Delete <ProductEntity>(_collectionName, id)); }
public async Task Delete(string id) { await _service.Delete <SurveyEntity>(_collectionName, id); }
public Task Delete(string id) { return(_mongoService.Delete <CategoryEntity>(_collectionName, id)); }