diff --git a/appveyor.yml b/appveyor.yml index 7761f50f3..434540185 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -26,7 +26,7 @@ install: build_script: - mvn clean package -B -Dmaven.test.skip=true test_script: - - mvn clean install --batch-mode -Pqulice -Dbranch.coverage=0.51 + - mvn clean install --batch-mode -Pqulice -Dbranch.coverage=0.44 cache: - C:\maven\ - C:\Users\appveyor\.m2 diff --git a/pom.xml b/pom.xml index e54affbfc..5b3140a9a 100644 --- a/pom.xml +++ b/pom.xml @@ -77,7 +77,7 @@ SOFTWARE. 3.8.0 3.6 - 0.52 + 0.45 @@ -476,7 +476,7 @@ SOFTWARE. INSTRUCTION COVEREDRATIO - 0.60 + 0.58 LINE @@ -488,6 +488,13 @@ SOFTWARE. branch coverage of 65% and class missed count of max 15. Remember to increase those coverages below in jacoco configuration. --> + BRANCH COVEREDRATIO @@ -496,7 +503,7 @@ SOFTWARE. COMPLEXITY COVEREDRATIO - 0.57 + 0.46 METHOD @@ -506,19 +513,11 @@ SOFTWARE. CLASS MISSEDCOUNT - 60 + 68 - - - com/zerocracy/stk/**/* - diff --git a/src/test/resources/com/zerocracy/bundles/changes_user_rate/_after.groovy b/src/test/resources/com/zerocracy/bundles/changes_user_rate/_after.groovy new file mode 100644 index 000000000..20b77307c --- /dev/null +++ b/src/test/resources/com/zerocracy/bundles/changes_user_rate/_after.groovy @@ -0,0 +1,30 @@ +/** + * Copyright (c) 2016-2018 Zerocracy + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to read + * the Software only. Permissions is hereby NOT GRANTED to use, copy, modify, + * merge, publish, distribute, sublicense, and/or sell copies of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +package com.zerocracy.bundles.changes_user_rate + +import com.jcabi.xml.XML +import com.zerocracy.Project +import com.zerocracy.pm.cost.Rates +import org.hamcrest.MatcherAssert +import org.hamcrest.Matchers + +def exec(Project project, XML xml) { + MatcherAssert.assertThat( + new Rates(project).rate('user42').decimal().doubleValue(), + Matchers.equalTo(100.0D) + ) +} diff --git a/src/test/resources/com/zerocracy/bundles/changes_user_rate/_before.groovy b/src/test/resources/com/zerocracy/bundles/changes_user_rate/_before.groovy new file mode 100644 index 000000000..27e0ef28d --- /dev/null +++ b/src/test/resources/com/zerocracy/bundles/changes_user_rate/_before.groovy @@ -0,0 +1,30 @@ +/** + * Copyright (c) 2016-2018 Zerocracy + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to read + * the Software only. Permissions is hereby NOT GRANTED to use, copy, modify, + * merge, publish, distribute, sublicense, and/or sell copies of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +package com.zerocracy.bundles.changes_user_rate + +import com.jcabi.xml.XML +import com.zerocracy.Farm +import com.zerocracy.Project +import com.zerocracy.pmo.People + +def exec(Project project, XML xml) { + Farm farm = binding.variables.farm + People people = new People(farm).bootstrap() + String user = 'user42' + people.wallet(user, 'paypal', 'user@example.com') + people.details(user, 'something') +} diff --git a/src/test/resources/com/zerocracy/bundles/changes_user_rate/claims.xml b/src/test/resources/com/zerocracy/bundles/changes_user_rate/claims.xml new file mode 100644 index 000000000..669cb2521 --- /dev/null +++ b/src/test/resources/com/zerocracy/bundles/changes_user_rate/claims.xml @@ -0,0 +1,29 @@ + + + + + 2017-07-21T20:32:19.716Z + Change user rate + test;C123;user42 + g4s8 + + user42 + $100 + + + diff --git a/src/test/resources/com/zerocracy/bundles/changes_user_rate/people.xml b/src/test/resources/com/zerocracy/bundles/changes_user_rate/people.xml new file mode 100644 index 000000000..530bd276f --- /dev/null +++ b/src/test/resources/com/zerocracy/bundles/changes_user_rate/people.xml @@ -0,0 +1,25 @@ + + + + + g4s8 + + + 0crat + + diff --git a/src/test/resources/com/zerocracy/bundles/changes_user_rate/roles.xml b/src/test/resources/com/zerocracy/bundles/changes_user_rate/roles.xml new file mode 100644 index 000000000..a06492e6e --- /dev/null +++ b/src/test/resources/com/zerocracy/bundles/changes_user_rate/roles.xml @@ -0,0 +1,25 @@ + + + + + ARC + + + DEV + +