This is an automated email from the ASF dual-hosted git repository. awasum pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/fineract-cn-reporting.git
commit 689fc6e1c97fa6dbe2246063b52bca9d7a99e3f5 Author: Myrle Krantz <[email protected]> AuthorDate: Mon Apr 16 14:53:05 2018 +0200 Removing navel-gazing test --- .../io/mifos/reporting/api/v1/domain/Sample.java | 38 -------------- .../mifos/reporting/api/v1/domain/SampleTest.java | 58 ---------------------- 2 files changed, 96 deletions(-) diff --git a/api/src/test/java/io/mifos/reporting/api/v1/domain/Sample.java b/api/src/test/java/io/mifos/reporting/api/v1/domain/Sample.java deleted file mode 100644 index ac319d1..0000000 --- a/api/src/test/java/io/mifos/reporting/api/v1/domain/Sample.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package io.mifos.reporting.api.v1.domain; - -public class Sample { - private Object identifier; - private Object payload; - public Sample(){ - super(); - } - public static Sample create(String xxxx, String yyy) { - return new Sample(); - } - - public void setIdentifier(Object identifier) { - this.identifier = identifier; - } - - public void setPayload(String payload) { - this.payload = payload; - } -} diff --git a/api/src/test/java/io/mifos/reporting/api/v1/domain/SampleTest.java b/api/src/test/java/io/mifos/reporting/api/v1/domain/SampleTest.java deleted file mode 100644 index 2bdb53b..0000000 --- a/api/src/test/java/io/mifos/reporting/api/v1/domain/SampleTest.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package io.mifos.reporting.api.v1.domain; - -import io.mifos.core.test.domain.ValidationTest; -import io.mifos.core.test.domain.ValidationTestCase; -import org.apache.commons.lang.RandomStringUtils; -import org.junit.runners.Parameterized; - -import java.util.ArrayList; -import java.util.Collection; - -public class SampleTest extends ValidationTest<Sample> { - - public SampleTest(ValidationTestCase<Sample> testCase) { - super(testCase); - } - - @Override - protected Sample createValidTestSubject() { - return Sample.create("xxxx", "yyy"); - } - - @Parameterized.Parameters - public static Collection testCases() { - final Collection<ValidationTestCase> ret = new ArrayList<>(); - ret.add(new ValidationTestCase<Sample>("basicCase") - .adjustment(x -> {}) - .valid(true)); - ret.add(new ValidationTestCase<Sample>("nullIdentifier") - .adjustment(x -> x.setIdentifier(null)) - .valid(false)); - ret.add(new ValidationTestCase<Sample>("tooShortIdentifier") - .adjustment(x -> x.setIdentifier("z")) - .valid(false)); - ret.add(new ValidationTestCase<Sample>("tooLongPayload") - .adjustment(x -> x.setPayload(RandomStringUtils.randomAlphanumeric(513))) - .valid(false)); - return ret; - } - -} \ No newline at end of file
