Examples of Nupkg


Examples of ru.aristar.jnuget.files.Nupkg

        //WHEN
        Collection<Nupkg> result = packageSource.getPackages("NUnit");
        //THEN
        assertNotNull("Коллекция пакетов", result);
        assertEquals("Пакетов в коллекции", 1, result.size());
        Nupkg resultNupkg = result.iterator().next();
        assertEquals("Идентификатор пакета", "NUnit", resultNupkg.getId());
        assertEquals("Хеш объекта", "kDPZtMu1BOZerHZvsbPnj7DfOdEyn/j4fanlv7BWuuVOZ0+VwuuxWzUnpD7jo7pkLjFOqIs41Vkk7abFZjPRJA==", resultNupkg.getHash().toString());
    }
View Full Code Here

Examples of ru.aristar.jnuget.files.Nupkg

        QueryLexer lexer = new QueryLexer();
        @SuppressWarnings("unchecked")
        PackageSource<? extends Nupkg> packageSource = context.mock(PackageSource.class);
        Expectations expectations = new Expectations();
        expectations.atLeast(0).of(packageSource).getPackages("projectwise.api");
        Nupkg pwPackage = context.mock(Nupkg.class);
        expectations.will(returnValue(Arrays.asList(pwPackage)));
        context.checking(expectations);
        final String filterString = "tolower(Id) eq 'projectwise.api'";
        //WHEN
        Expression expression = lexer.parse(filterString);
View Full Code Here

Examples of ru.aristar.jnuget.files.Nupkg

    @Test
    public void testFindTwoOrByIdPackage() throws NugetFormatException {
        //GIVEN
        QueryLexer lexer = new QueryLexer();
        //Пакеты
        Nupkg firstPackage = context.mock(Nupkg.class, "first.package");
        Nupkg secondPackage = context.mock(Nupkg.class, "second.package");

        //Источник пакетов
        @SuppressWarnings("unchecked")
        PackageSource<? extends Nupkg> packageSource = context.mock(PackageSource.class);
        Expectations expectations = new Expectations();
View Full Code Here

Examples of ru.aristar.jnuget.files.Nupkg

    public void testFindLastVersionByIdPackage() throws NugetFormatException {
        //GIVEN
        QueryLexer lexer = new QueryLexer();

        //Пакеты
        Nupkg firstPackage = context.mock(Nupkg.class, "first.package:1.1.2");
        Nupkg secondPackage = context.mock(Nupkg.class, "first.package:2.0.0");

        //Источник пакетов
        @SuppressWarnings("unchecked")
        PackageSource<? extends Nupkg> packageSource = context.mock(PackageSource.class);
        Expectations expectations = new Expectations();
View Full Code Here

Examples of ru.aristar.jnuget.files.Nupkg

    @Test
    public void testFindSharpDevelopQueryExecute() throws NugetFormatException {
        //GIVEN
        QueryLexer lexer = new QueryLexer();
        //Пакеты
        Nupkg firstPackage = context.mock(Nupkg.class, "first.package");
        NuspecFile firstNuspec = context.mock(NuspecFile.class, "first.nuspec");
        Nupkg secondPackage = context.mock(Nupkg.class, "second.package");
        NuspecFile secondNuspec = context.mock(NuspecFile.class, "second.nuspec");

        //Источник пакетов
        @SuppressWarnings("unchecked")
        PackageSource<? extends Nupkg> packageSource = context.mock(PackageSource.class);
View Full Code Here

Examples of ru.aristar.jnuget.files.Nupkg

    @Test
    public void testFindSharpDevelopQueryFilter() throws NugetFormatException {
        //GIVEN
        QueryLexer lexer = new QueryLexer();
        //Пакеты
        Nupkg firstPackage = context.mock(Nupkg.class, "first.package");
        NuspecFile firstNuspec = context.mock(NuspecFile.class, "first.nuspec");
        Nupkg secondPackage = context.mock(Nupkg.class, "second.package");
        NuspecFile secondNuspec = context.mock(NuspecFile.class, "second.nuspec");

        //Источник пакетов
        @SuppressWarnings("unchecked")
        PackageSource<? extends Nupkg> packageSource = context.mock(PackageSource.class);
View Full Code Here

Examples of ru.aristar.jnuget.files.Nupkg

     * @param version версия пакета
     * @return идентификатор фала пакета
     * @throws NugetFormatException некорректный формат версии
     */
    private Nupkg createNupkg(final String id, final String version) throws NugetFormatException {
        final Nupkg pack = context.mock(Nupkg.class, "nupkg" + (mockId++));
        context.checking(new Expectations() {
            {
                atLeast(0).of(pack).getId();
                will(returnValue(id));
                atLeast(0).of(pack).getVersion();
View Full Code Here

Examples of ru.aristar.jnuget.files.Nupkg

        //GIVEN
        Collection<Nupkg> idList = new ArrayList<>();
        idList.add(createNupkg("A", "1.1.1"));
        idList.add(createNupkg("A", "1.1.2"));
        idList.add(createNupkg("A", "1.2.1"));
        Nupkg lastA = createNupkg("A", "2.1.1");
        idList.add(lastA);
        idList.add(createNupkg("B", "2.1.1"));
        Nupkg lastB = createNupkg("B", "5.1.1");
        idList.add(lastB);
        //WHEN
        Collection<Nupkg> result = ClassicPackageSource.extractLastVersion(idList);
        Nupkg[] resArr = result.toArray(new Nupkg[0]);
        Arrays.sort(resArr, new Comparator<Nupkg>() {
View Full Code Here

Examples of ru.aristar.jnuget.files.Nupkg

        final ClassicPackageSource classicPackageSource = new ClassicPackageSource(testFolder);
        ModifyStrategy simplePushStrategy = new ModifyStrategy(true);
        classicPackageSource.setPushStrategy(simplePushStrategy);
        List<Nupkg> pushedPackages = new ArrayList<>();
        //Пакет
        final Nupkg nupkg = context.mock(Nupkg.class);
        Expectations expectations = new Expectations();
        expectations.atLeast(0).of(nupkg).getFileName();
        expectations.will(returnValue("NUnit.2.5.9.10348.nupkg"));
        expectations.atLeast(0).of(nupkg).getStream();
        expectations.will(returnValue(this.getClass().getResourceAsStream("/NUnit.2.5.9.10348.nupkg")));
View Full Code Here

Examples of ru.aristar.jnuget.files.Nupkg

        }

        @Override
        public Object invoke(Invocation invocation) throws Throwable {
            Object firstArgument = invocation.getParameter(0);
            Nupkg nupkg = (Nupkg) firstArgument;
            packages.add(nupkg);
            return true;
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.