Examples of Nupkg


Examples of ru.aristar.jnuget.files.Nupkg

        ArrayList<Nupkg> packages = new ArrayList<>();
        Expectations expectations = new Expectations();
        for (String versionString : versions) {
            Version version = Version.parse(versionString);
            final String mockName = packageId + ":" + version;
            final Nupkg nupkg = context.mock(Nupkg.class, mockName);
            packages.add(nupkg);
            expectations.atLeast(0).of(nupkg).getId();
            expectations.will(returnValue(packageId));
            expectations.atLeast(0).of(nupkg).getVersion();
            expectations.will(returnValue(version));
View Full Code Here

Examples of ru.aristar.jnuget.files.Nupkg

     */
    @Test
    @SuppressWarnings("unchecked")
    public void testRemoveFromEmptyStorage() throws Exception {
        //GIVEN
        Nupkg nupkg = createNupkgList("Nupkg", "0.0.1").get(0);
        final PackageSource packageSource = context.mock(PackageSource.class);
        List<Version> removedVersions = new ArrayList<>();
        List<String> removedIds = new ArrayList<>();
        final RemovedPackageVersionStub addRemovedVersionToList = new RemovedPackageVersionStub(removedVersions, removedIds);
        context.checking(new Expectations() {
View Full Code Here

Examples of ru.aristar.jnuget.files.Nupkg

                "0.0.7",
                "0.0.8",
                "0.0.9",
                "0.0.10",
                "0.0.11");
        Nupkg nupkg = nupkgs.get(0);
        List<Version> removedVersions = new ArrayList<>();
        List<String> removedIds = new ArrayList<>();
        final RemovedPackageVersionStub addRemovedVersionToList = new RemovedPackageVersionStub(removedVersions, removedIds);

        final PackageSource packageSource = context.mock(PackageSource.class);
View Full Code Here

Examples of ru.aristar.jnuget.files.Nupkg

            packageSource.setUnderlyingSource(filePackageSource, true).join();
            packageSource.setPushStrategy(new ModifyStrategy(true));
            //WHEN
            packageSource.pushPackage(nupkgFile);
            //THEN
            Nupkg nupkg = packageSource.getPackage("NUnit", Version.parse("2.5.9.10348"));
            assertNotNull(nupkg);
            assertEquals(ClassicNupkg.class, nupkg.getClass());
            ClassicNupkg classicNupkg = (ClassicNupkg) nupkg;
            assertEquals(localTestFolder, classicNupkg.getLocalFile().getParentFile());
        }
    }
View Full Code Here

Examples of ru.aristar.jnuget.files.Nupkg

     * @param version версия пакета
     * @return идентификатор фала пакета
     * @throws Exception некорректный формат версии
     */
    private Nupkg createNupkg(final String id, final String version) throws Exception {
        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

        rootPackageSource.getSources().add(source2);
        //WHEN
        Collection<Nupkg> result = rootPackageSource.getLastVersionPackages();
        //THEN
        assertEquals("Количкство пакетов", 1, result.size());
        Nupkg nupkg = result.iterator().next();
        assertEquals("Идентификатор пакета", "A", nupkg.getId());
        assertEquals("Версия пакета", Version.parse("1.2.4"), nupkg.getVersion());

    }
View Full Code Here

Examples of ru.aristar.jnuget.files.Nupkg

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

Examples of ru.aristar.jnuget.files.Nupkg

     * @throws Exception ошибка в процессе теста
     */
    @Test
    public void testGetLastVersions() throws Exception {
        //GIVEN
        Nupkg lastA, lastB, lastC;
        Nupkg[] nupkgs = new Nupkg[]{
            createNupkg("A", "1.1.0"),
            lastA = createNupkg("A", "1.2.0"),
            lastB = createNupkg("B", "1.1.0"),
            createNupkg("C", "2.1.0"),
View Full Code Here

Examples of ru.aristar.jnuget.files.Nupkg

        IdEqIgnoreCase eqIgnoreCase = new IdEqIgnoreCase("packageId");
        VersionEq versionEq = new VersionEq(Version.parse("1.2.3"));
        AndExpression andExpression = new AndExpression(eqIgnoreCase, versionEq);

        PackageSource packageSource = context.mock(PackageSource.class);
        Nupkg nupkg = context.mock(Nupkg.class);

        Expectations expectations = new Expectations();
        expectations.oneOf(packageSource).getPackages("packageId");
        expectations.will(returnValue(Arrays.asList(nupkg)));
View Full Code Here

Examples of ru.aristar.jnuget.files.Nupkg

     * @throws Exception ошибка в процессе теста
     */
    @Test
    public void testGetAllPackageVersionById() throws Exception {
        //GIVEN
        Nupkg firstA, lastA;
        Nupkg[] nupkgs = new Nupkg[]{
            firstA = createNupkg("A", "1.1.0"),
            lastA = createNupkg("A", "1.2.0"),
            createNupkg("B", "1.1.0"),
            createNupkg("C", "2.1.0"),
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.