aboutsummaryrefslogtreecommitdiff
path: root/src/test/java/BitbucketBuildFilterTest.java
diff options
context:
space:
mode:
authorMartin Damovsky <martin.damovsky@gmail.com>2017-02-20 13:14:26 +0100
committerGitHub <noreply@github.com>2017-02-20 13:14:26 +0100
commit6f4801d6123397c060a05e980f9421ed8b983aa3 (patch)
tree4eca6474a26791e58d5b01c37993b6126cc7744b /src/test/java/BitbucketBuildFilterTest.java
parentd6add0ce1f04133e65c0ec10b03268bded3818f0 (diff)
parent9417295b77c5b1da8dd5454862e2998f0f03ebb1 (diff)
downloadbbprb-6f4801d6123397c060a05e980f9421ed8b983aa3.tar.gz
Merge pull request #16 from jenkinsci/upgrading-parent-pom
Upgrading parent pom org.jenkins-ci.plugins to version 2.11.
Diffstat (limited to 'src/test/java/BitbucketBuildFilterTest.java')
-rw-r--r--src/test/java/BitbucketBuildFilterTest.java38
1 files changed, 19 insertions, 19 deletions
diff --git a/src/test/java/BitbucketBuildFilterTest.java b/src/test/java/BitbucketBuildFilterTest.java
index 3a94c82..21b4a01 100644
--- a/src/test/java/BitbucketBuildFilterTest.java
+++ b/src/test/java/BitbucketBuildFilterTest.java
@@ -45,12 +45,12 @@ public class BitbucketBuildFilterTest {
EasyMock.replay(cause);
for(String f : new String[] {"", "*", "any"}) {
- BitbucketBuildFilter filter = BitbucketBuildFilter.InstanceByString(f);
+ BitbucketBuildFilter filter = BitbucketBuildFilter.instanceByString(f);
assertTrue(filter.approved(cause));
}
for(String f : new String[] {"foo", "bar", " baz "}) {
- BitbucketBuildFilter filter = BitbucketBuildFilter.InstanceByString(f);
+ BitbucketBuildFilter filter = BitbucketBuildFilter.instanceByString(f);
assertFalse(filter.approved(cause));
}
}
@@ -63,12 +63,12 @@ public class BitbucketBuildFilterTest {
EasyMock.replay(cause);
for(String f : new String[] {"master-branch", "r:^master", "r:branch$", " master-branch "}) {
- BitbucketBuildFilter filter = BitbucketBuildFilter.InstanceByString(f);
+ BitbucketBuildFilter filter = BitbucketBuildFilter.instanceByString(f);
assertTrue(filter.approved(cause));
}
for(String f : new String[] {"develop", "feature-good-thing", "r:develop$"}) {
- BitbucketBuildFilter filter = BitbucketBuildFilter.InstanceByString(f);
+ BitbucketBuildFilter filter = BitbucketBuildFilter.instanceByString(f);
assertFalse(filter.approved(cause));
}
}
@@ -92,12 +92,12 @@ public class BitbucketBuildFilterTest {
EasyMock.replay(cause);
for(String f : new String[] {"s:feature-for-master d:master", "s:r:^feature d:master", "s:feature-for-master d:r:^m", "s:r:^feature d:r:^master"}) {
- BitbucketBuildFilter filter = BitbucketBuildFilter.InstanceByString(f);
+ BitbucketBuildFilter filter = BitbucketBuildFilter.instanceByString(f);
assertTrue(filter.approved(cause));
}
for(String f : new String[] {"s:feature-for-master d:foo", "s:bar d:master", "s:foo d:bar"}) {
- BitbucketBuildFilter filter = BitbucketBuildFilter.InstanceByString(f);
+ BitbucketBuildFilter filter = BitbucketBuildFilter.instanceByString(f);
assertFalse(filter.approved(cause));
}
}
@@ -111,12 +111,12 @@ public class BitbucketBuildFilterTest {
EasyMock.replay(cause);
for(String f : new String[] {"s: d:", "s:r:^feature s:good-branch d:r:.*", "s:good-branch s:feature-master d:r:.*", "s: d:r:.*", "d:master d:foo d:bar s:"}) {
- BitbucketBuildFilter filter = BitbucketBuildFilter.InstanceByString(f);
+ BitbucketBuildFilter filter = BitbucketBuildFilter.instanceByString(f);
assertTrue(filter.approved(cause));
}
for(String f : new String[] {"d:ggg d:ooo d:333 s:feature-master", "s:111 s:222 s:333 d:master"}) {
- BitbucketBuildFilter filter = BitbucketBuildFilter.InstanceByString(f);
+ BitbucketBuildFilter filter = BitbucketBuildFilter.instanceByString(f);
assertFalse(filter.approved(cause));
}
}
@@ -130,12 +130,12 @@ public class BitbucketBuildFilterTest {
EasyMock.replay(cause);
for(String f : new String[] {"s:feature-master d:", "d:master s:"}) {
- BitbucketBuildFilter filter = BitbucketBuildFilter.InstanceByString(f);
+ BitbucketBuildFilter filter = BitbucketBuildFilter.instanceByString(f);
assertTrue(filter.approved(cause));
}
for(String f : new String[] {"s:feature-master", "d:master"}) {
- BitbucketBuildFilter filter = BitbucketBuildFilter.InstanceByString(f);
+ BitbucketBuildFilter filter = BitbucketBuildFilter.instanceByString(f);
assertFalse(filter.approved(cause));
}
}
@@ -150,12 +150,12 @@ public class BitbucketBuildFilterTest {
EasyMock.replay(cause);
for(String f : new String[] {"a:test", "a:r:^test", "d: s: a:", "a:", "a:foo a:test"}) {
- BitbucketBuildFilter filter = BitbucketBuildFilter.InstanceByString(f);
+ BitbucketBuildFilter filter = BitbucketBuildFilter.instanceByString(f);
assertTrue(filter.approved(cause));
}
for(String f : new String[] {"s:feature-master", "d:master", "s:feature-master d: a:foo", "a:bar"}) {
- BitbucketBuildFilter filter = BitbucketBuildFilter.InstanceByString(f);
+ BitbucketBuildFilter filter = BitbucketBuildFilter.instanceByString(f);
assertFalse(filter.approved(cause));
}
}
@@ -167,11 +167,11 @@ public class BitbucketBuildFilterTest {
EasyMock.expect(cause.getTargetBranch()).andReturn("master").anyTimes();
EasyMock.replay(cause);
- assertTrue(BitbucketBuildFilter.FilterFromGitSCMSource(null, "").isEmpty());
- assertEquals("default", BitbucketBuildFilter.FilterFromGitSCMSource(null, "default"));
+ assertTrue(BitbucketBuildFilter.filterFromGitSCMSource(null, "").isEmpty());
+ assertEquals("default", BitbucketBuildFilter.filterFromGitSCMSource(null, "default"));
- assertTrue(BitbucketBuildFilter.InstanceByString(
- BitbucketBuildFilter.FilterFromGitSCMSource(null, "")).approved(cause)
+ assertTrue(BitbucketBuildFilter.instanceByString(
+ BitbucketBuildFilter.filterFromGitSCMSource(null, "")).approved(cause)
);
}
@@ -187,9 +187,9 @@ public class BitbucketBuildFilterTest {
EasyMock.replay(git);
assertTrue(git.getIncludes().isEmpty());
- assertEquals("", BitbucketBuildFilter.FilterFromGitSCMSource(git, ""));
- assertEquals("d:master d:feature-branch", BitbucketBuildFilter.FilterFromGitSCMSource(git, ""));
- assertEquals("d:master", BitbucketBuildFilter.FilterFromGitSCMSource(git, ""));
+ assertEquals("", BitbucketBuildFilter.filterFromGitSCMSource(git, ""));
+ assertEquals("d:master d:feature-branch", BitbucketBuildFilter.filterFromGitSCMSource(git, ""));
+ assertEquals("d:master", BitbucketBuildFilter.filterFromGitSCMSource(git, ""));
}
@Test