Search in sources :

Example 16 with SCMConfigurations

use of com.thoughtworks.go.plugin.access.scm.SCMConfigurations in project gocd by gocd.

the class PluggableSCMMaterialTest method shouldGetUriForDisplay.

@Test
void shouldGetUriForDisplay() {
    SCMMetadataStore.getInstance().addMetadataFor("some-plugin", new SCMConfigurations(), null);
    ConfigurationProperty k1 = ConfigurationPropertyMother.create("k1", false, "scm-v1");
    ConfigurationProperty k2 = ConfigurationPropertyMother.create("k2", false, "scm-v2");
    Configuration configuration = new Configuration(k1, k2);
    SCM scmConfig = SCMMother.create("scm-id", "scm-name", "some-plugin", "version", configuration);
    PluggableSCMMaterial material = new PluggableSCMMaterial();
    material.setSCMConfig(scmConfig);
    assertThat(material.getUriForDisplay()).isEqualTo("[k1=scm-v1, k2=scm-v2]");
}
Also used : PluggableSCMMaterial(com.thoughtworks.go.config.materials.PluggableSCMMaterial) SCMConfigurations(com.thoughtworks.go.plugin.access.scm.SCMConfigurations) SCM(com.thoughtworks.go.domain.scm.SCM) Test(org.junit.jupiter.api.Test)

Aggregations

SCMConfigurations (com.thoughtworks.go.plugin.access.scm.SCMConfigurations)16 Test (org.junit.jupiter.api.Test)12 SCMConfiguration (com.thoughtworks.go.plugin.access.scm.SCMConfiguration)11 SCMPreference (com.thoughtworks.go.plugin.access.scm.SCMPreference)6 PluggableSCMMaterial (com.thoughtworks.go.config.materials.PluggableSCMMaterial)2 SCMProperty (com.thoughtworks.go.plugin.access.scm.SCMProperty)2 SCMPropertyConfiguration (com.thoughtworks.go.plugin.access.scm.SCMPropertyConfiguration)2 GoPluginDescriptor (com.thoughtworks.go.plugin.infra.plugininfo.GoPluginDescriptor)2 Before (org.junit.Before)2 Configuration (com.thoughtworks.go.domain.config.Configuration)1 ConfigurationValue (com.thoughtworks.go.domain.config.ConfigurationValue)1 PluginConfiguration (com.thoughtworks.go.domain.config.PluginConfiguration)1 SCM (com.thoughtworks.go.domain.scm.SCM)1 PackageConfigurations (com.thoughtworks.go.plugin.access.packagematerial.PackageConfigurations)1 JsonBasedPluggableTask (com.thoughtworks.go.plugin.access.pluggabletask.JsonBasedPluggableTask)1 TaskPreference (com.thoughtworks.go.plugin.access.pluggabletask.TaskPreference)1 SCMView (com.thoughtworks.go.plugin.access.scm.SCMView)1 TaskView (com.thoughtworks.go.plugin.api.task.TaskView)1 GoCipher (com.thoughtworks.go.security.GoCipher)1