Package ru.aristar.jnuget

Examples of ru.aristar.jnuget.NugetContext$ContextPackageEntry


        //GIVEN
        InputStream inputStream = this.getClass().getResourceAsStream("/NUnit.2.5.9.10348.nupkg");
        final Date date = new Date();
        TempNupkgFile nupkgFile = new TempNupkgFile(inputStream, date);
        //WHEN
        NugetContext context = new NugetContext(new URI("http://localhost:8090/"));
        PackageEntry entry = context.createPackageEntry(nupkgFile);
        //THEN
        assertEquals("Идентификатор пакета",
                "http://localhost:8090/nuget/Packages(Id='NUnit',Version='2.5.9.10348')",
                entry.getId());
        assertEquals("Название пакета", "NUnit", entry.getTitle());
View Full Code Here


        //GIVEN
        InputStream inputStream = this.getClass().getResourceAsStream("/NUnit.2.5.9.10348.nupkg");
        final Date date = new Date();
        TempNupkgFile nupkgFile = new TempNupkgFile(inputStream, date);
        //WHEN
        NugetContext context = new NugetContext(new URI("http://localhost:8090/"));
        EntryProperties properties = context.createPackageEntry(nupkgFile).getProperties();
        //THEN
        assertThat("Свойства RSS вложения созданы", properties, is(notNullValue()));
        assertThat("Дата публикации пакета", properties.getPublished(), is(equalTo(date)));
        assertThat("Хеш пакета", properties.getPackageHash(), is(equalTo(nupkgFile.getHash().toString())));
        assertThat("Размер пакета", properties.getPackageSize(), is(equalTo(nupkgFile.getSize())));
View Full Code Here

TOP

Related Classes of ru.aristar.jnuget.NugetContext$ContextPackageEntry

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.