Package ru.aristar.jnuget

Examples of ru.aristar.jnuget.Version


        NuspecFile nuspecFile = NuspecFile.Parse(inputStream);
        EntryProperties properties = new EntryProperties();
        //WHEN       
        properties.setNuspec(nuspecFile);
        //THEN
        assertEquals("Версия пакета", new Version(2, 5, 9, "10348"), properties.getVersion());
        assertEquals("Заголовок", "", properties.getTitle());
        assertEquals("URL иконки", "", properties.getIconUrl());
        assertEquals("URL лицензии", "", properties.getLicenseUrl());
        assertEquals("URL проекта", "", properties.getProjectUrl());
        assertEquals("URL отчета", "", properties.getReportAbuseUrl());
View Full Code Here


        this.pattern = Pattern.compile(pattern);
    }

    @Override
    public boolean doAction(Nupkg nupkg, PackageSource<? extends Nupkg> packageSource) throws NugetPushException {
        Version version = nupkg.getVersion();
        if (version == null) {
            logger.info("Публикация пакета запрещена. Версия не указана");
            return false;
        }
        String strVersion = version.toString();
        Matcher matcher = pattern.matcher(strVersion);
        final boolean result = matcher.matches();
        if (!result) {
            logger.info(format("Публикация пакета запрещена. Версия {0} не "
                    + "соответствует формату", strVersion));
View Full Code Here

TOP

Related Classes of ru.aristar.jnuget.Version

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.