• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java PackageConfiguration类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.thoughtworks.go.plugin.api.material.packagerepository.PackageConfiguration的典型用法代码示例。如果您正苦于以下问题:Java PackageConfiguration类的具体用法?Java PackageConfiguration怎么用?Java PackageConfiguration使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



PackageConfiguration类属于com.thoughtworks.go.plugin.api.material.packagerepository包,在下文中一共展示了PackageConfiguration类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: latestModificationSince

import com.thoughtworks.go.plugin.api.material.packagerepository.PackageConfiguration; //导入依赖的package包/类
@Override
public PackageRevision latestModificationSince(PackageConfiguration packageConfiguration,
                                               RepositoryConfiguration repositoryConfiguration,
                                               PackageRevision previouslyKnownRevision) {
    LOGGER.debug("latestModificationSince called with previous revision " + previouslyKnownRevision);

    PackageRevision latestRevision = getLatestRevision(packageConfiguration, repositoryConfiguration);

    if (latestRevision != null &&
            latestRevision.getTimestamp().after(previouslyKnownRevision.getTimestamp()))
    {
        LOGGER.info("Latest revision later than previous known.");
        return latestRevision;
    } else {
        return previouslyKnownRevision;
    }
}
 
开发者ID:Sounie,项目名称:springer-gocd-cloudfoundry-plugin,代码行数:18,代码来源:CloudFoundryPoller.java


示例2: latestModificationSince

import com.thoughtworks.go.plugin.api.material.packagerepository.PackageConfiguration; //导入依赖的package包/类
public PackageRevision latestModificationSince(PackageConfiguration packageConfig, RepositoryConfiguration repoConfig, PackageRevision previouslyKnownRevision) {
    LOGGER.info(String.format("latestModificationSince called with packageId %s, for repo: %s",
            packageConfig.get(NpmPackageConfig.PACKAGE_ID).getValue(), repoConfig.get(RepoUrl.REPO_URL).getValue()));
    validateConfig(repoConfig, packageConfig);
    NpmPackageConfig npmPackageConfig = new NpmPackageConfig(packageConfig);
    NpmParams params = new NpmParams(
            new NpmRepoConfig(repoConfig).getRepoUrl(),
            npmPackageConfig.getPackageId(),
            npmPackageConfig.getPollVersionFrom(),
            npmPackageConfig.getPollVersionTo(),
            previouslyKnownRevision);
    PackageRevision updatedPackage = poll(params);
    if (updatedPackage == null) {
        LOGGER.info(String.format("no modification since %s", previouslyKnownRevision.getRevision()));
        return null;
    }
    LOGGER.info(String.format("latestModificationSince returning with %s, %s",
            updatedPackage.getRevision(), updatedPackage.getTimestamp()));
    if (updatedPackage.getTimestamp().getTime() < previouslyKnownRevision.getTimestamp().getTime())
        LOGGER.warn(String.format("Updated Package %s published earlier (%s) than previous (%s, %s)",
                updatedPackage.getRevision(), updatedPackage.getTimestamp(), previouslyKnownRevision.getRevision(), previouslyKnownRevision.getTimestamp()));
    return updatedPackage;
}
 
开发者ID:varchev,项目名称:go-npm-poller,代码行数:24,代码来源:NpmPoller.java


示例3: getPackageConfiguration

import com.thoughtworks.go.plugin.api.material.packagerepository.PackageConfiguration; //导入依赖的package包/类
@Override
@EntryPoint
public PackageConfiguration getPackageConfiguration() {
    PackageConfiguration packageConfig = new PackageConfiguration();
    packageConfig.add(property(MODULE_NAME)
            .withDisplayName("Module Name")
            .withPartOfIdentity(true)
            .withDisplayOrder(0)
            .build());
    packageConfig.add(property(LOWER_VERSION_BOUND_INCLUSIVE)
            .withRequired(false)
            .withDisplayName("Version to poll >=")
            .withPartOfIdentity(false)
            .withDisplayOrder(1)
            .build());
    packageConfig.add(property(UPPER_VERSION_BOUND_EXCLUSIVE)
            .withRequired(false)
            .withDisplayName("Version to poll <")
            .withPartOfIdentity(false)
            .withDisplayOrder(2)
            .build());
    return packageConfig;
}
 
开发者ID:drrb,项目名称:go-puppet-forge-poller,代码行数:24,代码来源:ForgePollerPluginConfig.java


示例4: latestModificationSince

import com.thoughtworks.go.plugin.api.material.packagerepository.PackageConfiguration; //导入依赖的package包/类
@Override
@EntryPoint
public PackageRevision latestModificationSince(PackageConfiguration packageConfiguration, RepositoryConfiguration repositoryConfiguration, PackageRevision lastKnownRevision) {
    ModuleSpec module = moduleSpecFactory.build(packageConfiguration);
    Forge forge = forgeFactory.build(repositoryConfiguration);
    Version lastKnownReleaseVersion = Version.of(lastKnownRevision.getRevision());

    LOG.info("Looking up latest release of module %s in forge %s since version %s", module, forge, lastKnownReleaseVersion);
    try {
        ModuleVersion latestRelease = forge.getLatestVersion(module);
        if (latestRelease.getVersion().isGreaterThan(lastKnownReleaseVersion)) {
            //TODO: warn if this release is earlier than lastKnownRevision
            return latestRelease.toPackageRevision();
        } else {
            return null;
        }
    } catch (Forge.ModuleNotFound moduleNotFound) {
        LOG.info("Module %s not found in forge %s: %s", module, forge, moduleNotFound);
        return null;
    }
}
 
开发者ID:drrb,项目名称:go-puppet-forge-poller,代码行数:22,代码来源:ForgePoller.java


示例5: jsonForTagsForRepository

import com.thoughtworks.go.plugin.api.material.packagerepository.PackageConfiguration; //导入依赖的package包/类
private JSONArray jsonForTagsForRepository(PackageConfiguration packageConfiguration) {
    DefaultHttpClient client = new DefaultHttpClient();

    try {
        String urlForTags = MessageFormat.format("https://{0}/v1/repositories/{1}/tags",
                repositoryConfiguration.get("REGISTRY_URL").getValue(),
                packageConfiguration.get("REPOSITORY_NAME").getValue());
        HttpGet google = new HttpGet(urlForTags);
        HttpResponse response = client.execute(google);
        String jsonString = EntityUtils.toString(response.getEntity());
        return new JSONObject("{\"tags\":" + jsonString + "}").getJSONArray("tags");
    } catch (IOException e) {
        e.printStackTrace();
    }

    return null;
}
 
开发者ID:hammerdr,项目名称:go-docker-registry-poller,代码行数:18,代码来源:DockerRegistry.java


示例6: checkConnectionToPackage

import com.thoughtworks.go.plugin.api.material.packagerepository.PackageConfiguration; //导入依赖的package包/类
/**
 * Check if the package is valid.
 *
 * @param packageConfiguration
 * @param repositoryConfiguration
 * @return
 */
@Override
public Result checkConnectionToPackage(
        final PackageConfiguration packageConfiguration, 
        final RepositoryConfiguration repositoryConfiguration) {
    
    Result checkConnectionResult = this.checkConnectionToRepository(repositoryConfiguration);
    if (!checkConnectionResult.isSuccessful()) {
        return checkConnectionResult;
    }

    try {
        Result packageConfigurationValidationResult = packageValidation(packageConfiguration, repositoryConfiguration);
        if (!packageConfigurationValidationResult.isSuccessful()) {
            return packageConfigurationValidationResult;
        }

        PackageRevision latestRevision = this.getLatestRevision(packageConfiguration, repositoryConfiguration);
        return new Result().withSuccessMessages(String.format("Found package '%s'.", latestRevision.getRevision()));
    } catch (Exception e) {
        String message = String.format("Could not find any package that matched '%s'.", packageConfiguration.get(Constants.REPOSITORY).getValue());
        LOG.warn(message);
        return new Result().withErrorMessages(message);
    }
}
 
开发者ID:decoomanj,项目名称:gocd-docker-material-poller,代码行数:32,代码来源:DockerMaterialPoller.java


示例7: validateData

import com.thoughtworks.go.plugin.api.material.packagerepository.PackageConfiguration; //导入依赖的package包/类
/**
 * Validate the data of both configuration.
 * 
 * @param repositoryConfigurations
 * @param packageConfigurations 
 */
private void validateData(
        final RepositoryConfiguration repositoryConfigurations, 
        final PackageConfiguration packageConfigurations) {
    
    ValidationResult validationResult = new ValidationResult();
    new DockerMaterialConfiguration().validate(packageConfigurations, repositoryConfigurations, validationResult);
    if (!validationResult.isSuccessful()) {
        StringBuilder stringBuilder = new StringBuilder();
        for (ValidationError validationError : validationResult.getErrors()) {
            stringBuilder.append(validationError.getMessage()).append("; ");
        }
        String errorString = stringBuilder.toString();
        String message = errorString.substring(0, errorString.length() - 2);
        LOG.warn(String.format("Data validation failed: %s", message));
        throw new RuntimeException(message);
    }
}
 
开发者ID:decoomanj,项目名称:gocd-docker-material-poller,代码行数:24,代码来源:DockerMaterialPoller.java


示例8: getLatestRevision

import com.thoughtworks.go.plugin.api.material.packagerepository.PackageConfiguration; //导入依赖的package包/类
public PackageRevision getLatestRevision(PackageConfiguration packageConfig, RepositoryConfiguration repoConfig) {
    LOGGER.info(String.format("getLatestRevision called with packageName %s, for repo: %s",
            packageConfig.get(GenericArtifactoryPackageConfig.PACKAGE_ID).getValue(), repoConfig.get(RepoUrl.REPO_URL).getValue()));

    validateConfig(repoConfig, packageConfig);

    GenericArtifactoryPackageConfig artifactoryPackageConfig = new GenericArtifactoryPackageConfig(packageConfig);
    GenericArtifactoryRepoConfig artifactoryRepoConfig = new GenericArtifactoryRepoConfig(repoConfig);

    GenericArtifactoryParams params = GenericArtifactoryParams.createFrom(
            artifactoryRepoConfig.getRepoUrl(),
            artifactoryPackageConfig,
            null);

    PackageRevision packageRevision = poll(params);

    LOGGER.info(String.format("getLatestRevision returning with %s, %s",
            packageRevision.getRevision(),
            packageRevision.getTimestamp()));

    return packageRevision;
}
 
开发者ID:varchev,项目名称:go-generic-artifactory-poller,代码行数:23,代码来源:GenericArtifactoryPoller.java


示例9: shouldGetPackageConfiguration

import com.thoughtworks.go.plugin.api.material.packagerepository.PackageConfiguration; //导入依赖的package包/类
@Test
public void shouldGetPackageConfiguration() {
    PackageConfiguration configurations = pluginConfig.getPackageConfiguration();
    assertNotNull(configurations.get(PACKAGE_PATH));
    assertThat(configurations.get(PACKAGE_PATH).getOption(DISPLAY_NAME), is("Package Path"));
    assertThat(configurations.get(PACKAGE_PATH).getOption(DISPLAY_ORDER), is(1));
    assertNotNull(configurations.get(PACKAGE_ID));
    assertThat(configurations.get(PACKAGE_ID).getOption(DISPLAY_NAME), is("Package Id"));
    assertThat(configurations.get(PACKAGE_ID).getOption(DISPLAY_ORDER), is(2));
    assertNotNull(configurations.get(POLL_VERSION_FROM));
    assertThat(configurations.get(POLL_VERSION_FROM).getOption(DISPLAY_NAME), is("Version to poll >="));
    assertThat(configurations.get(POLL_VERSION_FROM).getOption(DISPLAY_ORDER), is(3));
    assertThat(configurations.get(POLL_VERSION_FROM).getOption(REQUIRED), is(false));
    assertNotNull(configurations.get(POLL_VERSION_TO));
    assertThat(configurations.get(POLL_VERSION_TO).getOption(DISPLAY_NAME), is("Version to poll <"));
    assertThat(configurations.get(POLL_VERSION_TO).getOption(DISPLAY_ORDER), is(4));
    assertThat(configurations.get(POLL_VERSION_TO).getOption(REQUIRED), is(false));
}
 
开发者ID:varchev,项目名称:go-generic-artifactory-poller,代码行数:19,代码来源:PluginConfigTest.java


示例10: shouldGetPackageConfiguration

import com.thoughtworks.go.plugin.api.material.packagerepository.PackageConfiguration; //导入依赖的package包/类
@Test
public void shouldGetPackageConfiguration() {
    PackageConfiguration configurations = debRepositoryConfiguration.getPackageConfiguration();
    assertThat(configurations.get(PACKAGE_NAME), is(notNullValue()));
    assertThat(configurations.get(Constants.PACKAGE_NAME).getOption(Property.SECURE), is(false));
    assertThat(configurations.get(Constants.PACKAGE_NAME).getOption(Property.PART_OF_IDENTITY), is(true));
    assertThat(configurations.get(Constants.PACKAGE_NAME).getOption(Property.REQUIRED), is(true));
    assertThat(configurations.get(Constants.PACKAGE_NAME).getOption(Property.DISPLAY_NAME), is("Debian Package Name"));
    assertThat(configurations.get(Constants.PACKAGE_NAME).getOption(Property.DISPLAY_ORDER), is(0));
    assertThat(configurations.get(VERSION_SPEC), is(notNullValue()));
    assertThat(configurations.get(Constants.VERSION_SPEC).getOption(Property.SECURE), is(false));
    assertThat(configurations.get(Constants.VERSION_SPEC).getOption(Property.PART_OF_IDENTITY), is(true));
    assertThat(configurations.get(Constants.VERSION_SPEC).getOption(Property.REQUIRED), is(false));
    assertThat(configurations.get(Constants.VERSION_SPEC).getOption(Property.DISPLAY_NAME), is("Version Spec"));
    assertThat(configurations.get(Constants.VERSION_SPEC).getOption(Property.DISPLAY_ORDER), is(1));
    assertThat(configurations.get(ARCHITECTURE), is(notNullValue()));
    assertThat(configurations.get(Constants.ARCHITECTURE).getOption(Property.SECURE), is(false));
    assertThat(configurations.get(Constants.ARCHITECTURE).getOption(Property.PART_OF_IDENTITY), is(true));
    assertThat(configurations.get(Constants.ARCHITECTURE).getOption(Property.REQUIRED), is(false));
    assertThat(configurations.get(Constants.ARCHITECTURE).getOption(Property.DISPLAY_NAME), is("Architecture"));
    assertThat(configurations.get(Constants.ARCHITECTURE).getOption(Property.DISPLAY_ORDER), is(2));
}
 
开发者ID:gocd-contrib,项目名称:deb-repo-poller,代码行数:23,代码来源:DebRepositoryConfigurationTest.java


示例11: shouldFailValidationIfSpuriousPropertiesAreConfigured

import com.thoughtworks.go.plugin.api.material.packagerepository.PackageConfiguration; //导入依赖的package包/类
@Test
public void shouldFailValidationIfSpuriousPropertiesAreConfigured() {
    ValidationResult validationResult = new ValidationResult();
    PackageConfiguration packageConfigurations = new PackageConfiguration();
    RepositoryConfiguration repositoryConfiguration = new RepositoryConfiguration();
    packageConfigurations.add(new PackageMaterialProperty("PACKAGE_NAME", "foo"));
    packageConfigurations.add(new PackageMaterialProperty("foo1", "foo"));
    packageConfigurations.add(new PackageMaterialProperty("foo2", "foo"));
    repositoryConfiguration.add(new PackageMaterialProperty("bar1", "bar"));
    repositoryConfiguration.add(new PackageMaterialProperty("bar2", "bar"));
    repositoryConfiguration.add(new PackageMaterialProperty("REPO_URL", "http://asdsa"));
    new DebRepositoryConfiguration().validate(packageConfigurations, repositoryConfiguration, validationResult);
    assertThat(validationResult.isSuccessful(), is(false));
    assertThat(validationResult.getErrors().contains(new ValidationError("", "Unsupported key(s) found : bar1, bar2. Allowed key(s) are : REPO_URL")), is(true));
    assertThat(validationResult.getErrors().contains(new ValidationError("", "Unsupported key(s) found : foo1, foo2. Allowed key(s) are : PACKAGE_NAME, VERSION_SPEC, ARCHITECTURE")), is(true));
}
 
开发者ID:gocd-contrib,项目名称:deb-repo-poller,代码行数:17,代码来源:DebRepositoryConfigurationTest.java


示例12: shouldThrowExceptionGivenEmptyRepo_getLatestRevision

import com.thoughtworks.go.plugin.api.material.packagerepository.PackageConfiguration; //导入依赖的package包/类
@Test
public void shouldThrowExceptionGivenEmptyRepo_getLatestRevision() throws Exception {
    RepositoryConfiguration repositoryPackageConfigurations = new RepositoryConfiguration();
    File emptyRepo = new File(getClass().getResource("/repos/emptyrepo").toURI());
    repositoryPackageConfigurations.add(new PackageMaterialProperty(Constants.REPO_URL, "file://" + emptyRepo.getAbsolutePath()));
    PackageConfiguration packagePackageConfigurations = new PackageConfiguration();
    packagePackageConfigurations.add(new PackageMaterialProperty(Constants.PACKAGE_NAME, "crap-artifact"));
    try {
        poller.getLatestRevision(packagePackageConfigurations, repositoryPackageConfigurations);
        fail("");
    } catch (RuntimeException e) {
        String expectedMessage = "Invalid file path.";
        String actualMessage = e.getMessage();
        assertThat(actualMessage.startsWith(expectedMessage), is((true)));
    }
}
 
开发者ID:gocd-contrib,项目名称:deb-repo-poller,代码行数:17,代码来源:DebRepositoryPollerTest.java


示例13: getPackageConfiguration

import com.thoughtworks.go.plugin.api.material.packagerepository.PackageConfiguration; //导入依赖的package包/类
@Override
public PackageConfiguration getPackageConfiguration() {
    LOGGER.debug("getPackageConfiguration called.");
    PackageConfiguration packageConfig = new PackageConfiguration();

    packageConfig.add(space);
    packageConfig.add(appName);
    packageConfig.add(orgName);
    return packageConfig;
}
 
开发者ID:Sounie,项目名称:springer-gocd-cloudfoundry-plugin,代码行数:11,代码来源:CloudFoundryConfig.java


示例14: checkConnectionToPackage

import com.thoughtworks.go.plugin.api.material.packagerepository.PackageConfiguration; //导入依赖的package包/类
@Override
public Result checkConnectionToPackage(PackageConfiguration packageConfiguration, RepositoryConfiguration repositoryConfiguration) {
    CloudFoundryClient client = getClient(repositoryConfiguration);

    Result result = new Result();

    final String appNamePrefix = packageConfiguration.get("APP_NAME").getValue();
        if (lookupAppNames(client, appNamePrefix).isEmpty()) {
            LOGGER.warn("No app found.");
            result = ExecutionResult.failure("No such app found in CloudFoundry.");
        }

    return result;
}
 
开发者ID:Sounie,项目名称:springer-gocd-cloudfoundry-plugin,代码行数:15,代码来源:CloudFoundryPoller.java


示例15: getLatestRevision

import com.thoughtworks.go.plugin.api.material.packagerepository.PackageConfiguration; //导入依赖的package包/类
public PackageRevision getLatestRevision(PackageConfiguration packageConfig, RepositoryConfiguration repoConfig) {
    LOGGER.info(String.format("getLatestRevision called with packageId %s, for repo: %s",
            packageConfig.get(NpmPackageConfig.PACKAGE_ID).getValue(), repoConfig.get(RepoUrl.REPO_URL).getValue()));
    validateConfig(repoConfig, packageConfig);
    NpmPackageConfig npm = new NpmPackageConfig(packageConfig);
    NpmParams params = new NpmParams(
            new NpmRepoConfig(repoConfig).getRepoUrl(),
            npm.getPackageId(),
            npm.getPollVersionFrom(),
            npm.getPollVersionTo(), null);
    PackageRevision packageRevision = poll(params);
    LOGGER.info(String.format("getLatestRevision returning with %s, %s",
            packageRevision.getRevision(), packageRevision.getTimestamp()));
    return packageRevision;
}
 
开发者ID:varchev,项目名称:go-npm-poller,代码行数:16,代码来源:NpmPoller.java


示例16: checkConnectionToPackage

import com.thoughtworks.go.plugin.api.material.packagerepository.PackageConfiguration; //导入依赖的package包/类
@Override
public Result checkConnectionToPackage(PackageConfiguration packageConfigs, RepositoryConfiguration repoConfigs) {
    Result response = checkConnectionToRepository(repoConfigs);
    if (!response.isSuccessful()) {
        LOGGER.info(response.getMessagesForDisplay());
        return response;
    }
    PackageRevision packageRevision = getLatestRevision(packageConfigs, repoConfigs);
    response.withSuccessMessages("Found " + packageRevision.getRevision());
    return response;
}
 
开发者ID:varchev,项目名称:go-npm-poller,代码行数:12,代码来源:NpmPoller.java


示例17: validateConfig

import com.thoughtworks.go.plugin.api.material.packagerepository.PackageConfiguration; //导入依赖的package包/类
private void validateConfig(RepositoryConfiguration repoConfig, PackageConfiguration packageConfig) {
    ValidationResult errors = new PluginConfig().isRepositoryConfigurationValid(repoConfig);
    errors.addErrors(new PluginConfig().isPackageConfigurationValid(packageConfig, repoConfig).getErrors());
    if (!errors.isSuccessful()) {
        StringBuilder stringBuilder = new StringBuilder();
        for (ValidationError validationError : errors.getErrors()) {
            stringBuilder.append(validationError.getMessage()).append("; ");
        }
        String errorString = stringBuilder.toString();
        throw new RuntimeException(errorString.substring(0, errorString.length() - 2));
    }
}
 
开发者ID:varchev,项目名称:go-npm-poller,代码行数:13,代码来源:NpmPoller.java


示例18: shouldGetPackageConfiguration

import com.thoughtworks.go.plugin.api.material.packagerepository.PackageConfiguration; //导入依赖的package包/类
@Test
public void shouldGetPackageConfiguration() {
    PackageConfiguration configurations = pluginConfig.getPackageConfiguration();
    assertNotNull(configurations.get(PACKAGE_ID));
    assertThat(configurations.get(PACKAGE_ID).getOption(DISPLAY_NAME), is("Package Id"));
    assertThat(configurations.get(PACKAGE_ID).getOption(DISPLAY_ORDER), is(0));
    assertNotNull(configurations.get(POLL_VERSION_FROM));
    assertThat(configurations.get(POLL_VERSION_FROM).getOption(DISPLAY_NAME), is("Version to poll >="));
    assertThat(configurations.get(POLL_VERSION_FROM).getOption(DISPLAY_ORDER), is(1));
    assertThat(configurations.get(POLL_VERSION_FROM).getOption(REQUIRED), is(false));
    assertNotNull(configurations.get(POLL_VERSION_TO));
    assertThat(configurations.get(POLL_VERSION_TO).getOption(DISPLAY_NAME), is("Version to poll <"));
    assertThat(configurations.get(POLL_VERSION_TO).getOption(DISPLAY_ORDER), is(2));
    assertThat(configurations.get(POLL_VERSION_TO).getOption(REQUIRED), is(false));
}
 
开发者ID:varchev,项目名称:go-npm-poller,代码行数:16,代码来源:PluginConfigTest.java


示例19: shouldRejectUnsupportedTagsInPkgConfig

import com.thoughtworks.go.plugin.api.material.packagerepository.PackageConfiguration; //导入依赖的package包/类
@Test
public void shouldRejectUnsupportedTagsInPkgConfig() {
    PackageConfiguration pkgConfig = new PackageConfiguration();
    pkgConfig.add(new PackageMaterialProperty(PACKAGE_ID, "abc"));
    pkgConfig.add(new PackageMaterialProperty("unsupported_key", "value"));
    assertForPackageConfigurationErrors(
            pkgConfig,
            asList(new ValidationError("Unsupported key: unsupported_key. Valid keys: " + Arrays.toString(NpmPackageConfig.getValidKeys()))),
            false);
}
 
开发者ID:varchev,项目名称:go-npm-poller,代码行数:11,代码来源:PluginConfigTest.java


示例20: shouldValidatePackageId

import com.thoughtworks.go.plugin.api.material.packagerepository.PackageConfiguration; //导入依赖的package包/类
@Test
public void shouldValidatePackageId() {
    assertForPackageConfigurationErrors(new PackageConfiguration(), asList(new ValidationError(PACKAGE_ID, "Package id not specified")), false);
    assertForPackageConfigurationErrors(configurations(PACKAGE_ID, null), asList(new ValidationError(PACKAGE_ID, "Package id is null")), false);
    assertForPackageConfigurationErrors(configurations(PACKAGE_ID, ""), asList(new ValidationError(PACKAGE_ID, "Package id is empty")), false);
    assertForPackageConfigurationErrors(configurations(PACKAGE_ID, "go-age?nt-*"), asList(new ValidationError(PACKAGE_ID, "Package id [go-age?nt-*] is invalid")), false);
    assertForPackageConfigurationErrors(configurations(PACKAGE_ID, "go-agent"), new ArrayList<ValidationError>(), true);
}
 
开发者ID:varchev,项目名称:go-npm-poller,代码行数:9,代码来源:PluginConfigTest.java



注:本文中的com.thoughtworks.go.plugin.api.material.packagerepository.PackageConfiguration类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java SequenceGenerator类代码示例发布时间:2022-05-22
下一篇:
Java Hashids类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap