Package ru.aristar.jnuget.rss

Examples of ru.aristar.jnuget.rss.PackageEntry


     * @param version версия пакета
     * @return пакет RSS
     * @throws NugetFormatException некорректная версия пакета
     */
    private PackageEntry createPackageEntry(String id, String version) throws NugetFormatException {
        PackageEntry packageEntry = new PackageEntry();
        packageEntry.setTitle(id);
        packageEntry.getProperties().setVersion(Version.parse(version));
        packageEntry.getProperties().setPackageHash("eoLGkBGTbHl1QsfOcTAx4mmIuTRs8e+wvxhaERmEuqjUSHiTdmiqRrtE1+exxR3Rh5ar0H3QXbGPpR9XsIqK2Q==");
        packageEntry.getProperties().setPackageSize(Long.valueOf(0));
        packageEntry.setContent("http://localhost:8090/nuget/download/" + id + "/" + version);
        return packageEntry;
    }
View Full Code Here


        nugetClient.setUrl(TEST_PACKAGESOURCE_URL);
        //WHEN
        PackageFeed result = nugetClient.getPackages(null, null, null, null, null);
        //THEN
        assertEquals("Количество пакетов", 1, result.getEntries().size());
        PackageEntry entry = result.getEntries().get(0);
        assertThat("Версия пакета", entry.getProperties().getVersion(), is(equalTo(Version.parse("2.5.9.10348"))));
        assertThat("HASH пакета", entry.getProperties().getPackageHash(), is(equalTo("kDPZtMu1BOZerHZvsbPnj7DfOdEyn/j4fanlv7BWuuVOZ0+VwuuxWzUnpD7jo7pkLjFOqIs41Vkk7abFZjPRJA==")));
        assertThat("Идентификатор пакета", entry.getTitle(), is(equalTo("NUnit")));
    }
View Full Code Here

     * @param version версия пакета
     * @return пакет RSS
     * @throws NugetFormatException некорректная версия пакета
     */
    private PackageEntry createPackageEntry(String id, String version) throws NugetFormatException {
        PackageEntry packageEntry = new PackageEntry();
        packageEntry.setTitle(id);
        packageEntry.getProperties().setVersion(Version.parse(version));
        packageEntry.getProperties().setPackageHash("eoLGkBGTbHl1QsfOcTAx4mmIuTRs8e+wvxhaERmEuqjUSHiTdmiqRrtE1+exxR3Rh5ar0H3QXbGPpR9XsIqK2Q==");
        packageEntry.getProperties().setPackageSize(Long.valueOf(0));
        packageEntry.setContent("http://localhost:8090/nuget/download/" + id + "/" + version);
        return packageEntry;
    }
View Full Code Here

     */
    @Test
    public void testCreateFromPackageEntry() throws Exception {
        //GIVEN
        InputStream inputStream = NuspecFileTest.class.getResourceAsStream("/rss/entry/Moq.xml");
        PackageEntry entry = PackageEntry.parse(inputStream);
        //WHEN
        NuspecFile nuspecFile = new NuspecFile(entry);
        //THEN
        assertEquals("Идентификатор пакета", "Moq", nuspecFile.getId());
        assertEquals("Версия пакета", Version.parse("4.0.10827"), nuspecFile.getVersion());
View Full Code Here

TOP

Related Classes of ru.aristar.jnuget.rss.PackageEntry

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.