aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/test')
-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