public void SearchMetaDataItemsAndAddToListAddedListItemsReturnList() { this.CleanUpTestFolder(); //arrange var metaDataMock = new MetadataItem(); var sut = new MetaDataRepository(FOLDER_PATH); this.valuta = new DateTime(2018, 09, 20); metaDataMock.FilePath = SOURCE_PATH; metaDataMock.ValutaDatum = this.valuta; metaDataMock.Guid = Guid.NewGuid(); metaDataMock.Benutzer = "Fer"; metaDataMock.Bezeichnung = "Hallo"; metaDataMock.Typ = "Verträge"; //act sut.StoreMetaDataItem(metaDataMock); ObservableCollection <MetadataItem> liste = sut.SearchMetaDataItemsAndAddToList(); //assert Assert.That(liste.Count == 1); this.CleanUpTestFolder(); }
public void StoreMetaDataItemChangeFilePathChangePositiv() { this.CleanUpTestFolder(); //arrange var metaDataMock = new MetadataItem(); var sut = new MetaDataRepository(FOLDER_PATH); this.valuta = new DateTime(2018, 09, 20); metaDataMock.FilePath = SOURCE_PATH; metaDataMock.ValutaDatum = this.valuta; metaDataMock.Guid = Guid.NewGuid(); //act sut.StoreMetaDataItem(metaDataMock); //assert Assert.That(sut.FolderPath != null); Assert.That(metaDataMock.FilePath != metaDataMock.NewFilePath); this.CleanUpTestFolder(); }