private void LoadData() { var directoryPath = ConfigurationManager.AppSettings.Get("RepositoryDir"); var imp = new ImportMetadata(); _allItems = imp.ImportMetafiles(directoryPath, new XmlSer()); FilteredMetadataItems = _allItems; }
public void ImportMetadata_DirectoryExist_ReturnsEmpty() { //arrange const string path = "Testordner\\Testempty"; ImportMetadata import = new ImportMetadata(); //act List <MetadataItem> result = import.ImportMetafiles(path, new XmlSer()); //assert Assert.That(result, Is.Empty); }
public void ImportMetadata_DoesDirectoryExist_ReturnsNull() { //arrange const string path = "C:\\einTestPfad"; ImportMetadata import = new ImportMetadata(); //act List <MetadataItem> result = import.ImportMetafiles(path, new XmlSer()); //assert Assert.That(result, Is.Null); }
public void ImportMetadata_ImportList_ReturnsList() { //arrange const string path = "Testordner"; ImportMetadata import = new ImportMetadata(); //act List <MetadataItem> result = import.ImportMetafiles(path, new XmlSerStub(true)); //assert Assert.That(result, Is.EqualTo(new List <MetadataItem> { null, null, null })); }