Package com.tuenti.supernanny.repo.index

Examples of com.tuenti.supernanny.repo.index.IndexReader$CountingBufferedReader


        } catch (FileNotFoundException f) {
          throw new SuperNannyError("Can't find index file " + urlgz + " or " + urlplain);
        }
      }

      IndexReader indexReader = new IndexReader(in);
      setArtifacts(indexReader.parse());
      in.close();
    } catch (Exception e) {
      throw new RuntimeException(e);
    }
  }
View Full Code Here


public class IndexTest {
  @Test
  public void testIndex() throws IOException {
    BufferedReader bufferedReader = new BufferedReader(new FileReader(new File("./testData/index1.txt")));
    IndexReader ir = new IndexReader(bufferedReader);
    List<ArchiveArtifact> artifacts = ir.parse();

    Assert.assertEquals(4, artifacts.size());
   
    ArchiveArtifact a = artifacts.get(0);
    Assert.assertEquals("libphonenumber", a.getName());
View Full Code Here

        return RepositoryType.TARBZ2;
      }
    };
    BufferedReader bufferedReader = new BufferedReader(new FileReader(new File(
        "testData/index2.txt")));
    IndexReader ir = new IndexReader(bufferedReader);
    List<ArchiveArtifact> artifacts = ir.parse();
    repo.setArtifacts(artifacts);
    RepoProvider provider = injector.getInstance(RepoProvider.class);
    provider.addRepo(RepositoryType.TARBZ2, "http://localhost", repo);
  }
View Full Code Here

TOP

Related Classes of com.tuenti.supernanny.repo.index.IndexReader$CountingBufferedReader

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.