private void OnCmdSuchen()
 {
     if (string.IsNullOrEmpty(_suchbegriff) && string.IsNullOrEmpty(_selectedTypItem))
     {
         _messegaBoxService.Show("Bitte einen Filter setzen.");
     }
     else
     {
         FilteredMetadataItems = _documentManagementService.SearchDocument(_suchbegriff, _selectedTypItem);
     }
 }
示例#2
0
        public void SearchDocument__SearchingOfBoth2_False()
        {
            // arrange
            var messegaBoxService = new MessageBoxServiceForTesting();
            var importService     = new ImportServiceForTesting(true);
            var exportService     = new ExportServiceForTesting(true);
            var fileService       = new FileServiceForTesting(true, true, true, true);
            var searchService     = new SearchServiceForTesting(true, true, false);
            var itemlist          = new List <MetadataItem>();

            itemlist.Add(new MetadataItem(Guid.Parse("3fc6a223-369b-4efd-a0c4-f563ee6d67f8"), "Username",
                                          "Dokumenten Bezeichnung", DateTime.Parse("01.01.2020 19:00:00"), "Verträge", "Notiz",
                                          DateTime.Parse("30.06.2020 00:00:00"), "document.docx"));
            var DMS = new DocumentManagementService(itemlist, messegaBoxService, importService, exportService, fileService, searchService);

            // act
            var result = DMS.SearchDocument("AndererText", "Verträge");

            // assert
            Assert.That(result, Is.EqualTo(new List <MetadataItem>()));
        }