/*-
 * Copyright (c) 2014 Red Hat, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.fedoraproject.xmvn.resolver.impl;

import static org.junit.Assert.fail;

import org.junit.Ignore;
import org.junit.Test;

/**
 * @author Mikolaj Izdebski
 */
public class MetadataReaderTest
{
    @Test
    @Ignore
    public void test()
    {
        fail( "Not yet implemented" );
    }
}

@@ -673,20 +673,181 @@
 .Assert.
-fail
+assertNotNull;%0Aimport static org.junit.Assert.assertTrue;%0A%0Aimport java.nio.file.Files;%0Aimport java.nio.file.Path;%0Aimport java.util.Collections;%0Aimport java.util.List
 ;%0A%0Aimpor
@@ -858,19 +858,19 @@
 g.junit.
-Ign
+Bef
 ore;%0Aimp
@@ -890,16 +890,73 @@
 .Test;%0A%0A
+import org.fedoraproject.xmvn.metadata.PackageMetadata;%0A%0A
 /**%0A * @
@@ -1025,90 +1025,1376 @@
     
-@Test%0A    @Ignore%0A    public void test()%0A    %7B%0A        fail( %22Not yet implemented%22
+private MetadataReader reader;%0A%0A    @Before%0A    public void setUp()%0A    %7B%0A        reader = new MetadataReader();%0A    %7D%0A%0A    /**%0A     * Test if trying to read metadata from empty list of directories returns empty result.%0A     * %0A     * @throws Exception%0A     */%0A    @Test%0A    public void testReadingEmptyList()%0A        throws Exception%0A    %7B%0A        List%3CPackageMetadata%3E list = reader.readMetadata( Collections.%3CString%3E emptyList() );%0A        assertNotNull( list );%0A        assertTrue( list.isEmpty() );%0A    %7D%0A%0A    /**%0A     * Test if trying to read metadata from empty directory returns empty result.%0A     * %0A     * @throws Exception%0A     */%0A    @Test%0A    public void testReadingEmptyDirectory()%0A        throws Exception%0A    %7B%0A        Path dir = Files.createTempDirectory( %22xmvn-test%22 );%0A        List%3CPackageMetadata%3E list = reader.readMetadata( Collections.singletonList( dir.toString() ) );%0A        assertNotNull( list );%0A        assertTrue( list.isEmpty() );%0A    %7D%0A%0A    /**%0A     * Test if trying to read metadata from depmap file empty result.%0A     * %0A     * @throws Exception%0A     */%0A    @Test%0A    public void testReadingDepmap()%0A        throws Exception%0A    %7B%0A        List%3CPackageMetadata%3E list =%0A            reader.readMetadata( Collections.singletonList( %22src/test/resources/xml-depmap.xml%22 ) );%0A        assertNotNull( list );%0A        assertTrue( list.isEmpty()
  );%0A

Add basic tests for MetadataReader