diff options
6 files changed, 271 insertions, 27 deletions
diff --git a/LICENSE.txt b/LICENSE.txt index d645695..2bb9ad2 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,4 +1,3 @@ - Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ @@ -174,29 +173,4 @@ incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed 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. + END OF TERMS AND CONDITIONS
\ No newline at end of file diff --git a/ceilometer-model/pom.xml b/ceilometer-model/pom.xml index 5d540fe..5d60ac9 100644 --- a/ceilometer-model/pom.xml +++ b/ceilometer-model/pom.xml @@ -9,4 +9,13 @@ <artifactId>ceilometer-model</artifactId> <name>OpenStack Ceilometer Model</name> <description>OpenStack Ceilometer Model</description> + + <dependencies> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.12</version> + <scope>test</scope> + </dependency> + </dependencies> </project> diff --git a/ceilometer-model/src/test/java/com/woorea/openstack/ceilometer/v2/model/MeterTest.java b/ceilometer-model/src/test/java/com/woorea/openstack/ceilometer/v2/model/MeterTest.java new file mode 100644 index 0000000..12690f6 --- /dev/null +++ b/ceilometer-model/src/test/java/com/woorea/openstack/ceilometer/v2/model/MeterTest.java @@ -0,0 +1,54 @@ +/*- + * ============LICENSE_START======================================================= + * Licensed 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. + * ============LICENSE_END========================================================= + */ +package com.woorea.openstack.ceilometer.v2.model; + +import org.junit.Test; + +public class MeterTest { + + Meter meter = new Meter(); + + @Test + public void getUserTest() throws Exception { + meter.getUser(); + } + + @Test + public void getNameTest() throws Exception { + meter.getName(); + } + + @Test + public void getResource() throws Exception { + meter.getResource(); + } + + @Test + public void getProjectTest() throws Exception { + meter.getProject(); + } + + @Test + public void getTypeTest() throws Exception { + meter.getType(); + } + + @Test + public void getUnitTest() throws Exception { + meter.getUnit(); + } + +}
\ No newline at end of file diff --git a/ceilometer-model/src/test/java/com/woorea/openstack/ceilometer/v2/model/ResourceTest.java b/ceilometer-model/src/test/java/com/woorea/openstack/ceilometer/v2/model/ResourceTest.java new file mode 100644 index 0000000..cf0ddcf --- /dev/null +++ b/ceilometer-model/src/test/java/com/woorea/openstack/ceilometer/v2/model/ResourceTest.java @@ -0,0 +1,49 @@ +/*- + * ============LICENSE_START======================================================= + * Licensed 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. + * ============LICENSE_END========================================================= + */ +package com.woorea.openstack.ceilometer.v2.model; + +import org.junit.Test; + +public class ResourceTest { + + Resource resource = new Resource(); + + @Test + public void getResourceTest() throws Exception { + resource.getResource(); + } + + @Test + public void getTimestampTest() throws Exception { + resource.getTimestamp(); + } + + @Test + public void getProjectTest() throws Exception { + resource.getProject(); + } + + @Test + public void getUserTest() throws Exception { + resource.getUser(); + } + + @Test + public void getMetadataTest() throws Exception { + resource.getMetadata(); + } + +}
\ No newline at end of file diff --git a/ceilometer-model/src/test/java/com/woorea/openstack/ceilometer/v2/model/SampleTest.java b/ceilometer-model/src/test/java/com/woorea/openstack/ceilometer/v2/model/SampleTest.java new file mode 100644 index 0000000..54506a0 --- /dev/null +++ b/ceilometer-model/src/test/java/com/woorea/openstack/ceilometer/v2/model/SampleTest.java @@ -0,0 +1,79 @@ +/*- + * ============LICENSE_START======================================================= + * Licensed 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. + * ============LICENSE_END========================================================= + */ +package com.woorea.openstack.ceilometer.v2.model; + +import org.junit.Test; + +public class SampleTest { + + Sample sample = new Sample(); + + @Test + public void getCounterTypeTest() throws Exception { + sample.getCounterType(); + } + + @Test + public void getCounterNameTest() throws Exception { + sample.getCounterName(); + } + + @Test + public void getCounterUnitTest() throws Exception { + sample.getCounterUnit(); + } + + @Test + public void getCounterVolumeTest() throws Exception { + sample.getCounterVolume(); + } + + @Test + public void getSourceTest() throws Exception { + sample.getSource(); + } + + @Test + public void getProjectTest() throws Exception { + sample.getProject(); + } + + @Test + public void getUserTest() throws Exception { + sample.getUser(); + } + + @Test + public void getResourceTest() throws Exception { + sample.getResource(); + } + + @Test + public void getTimestampTest() throws Exception { + sample.getTimestamp(); + } + + @Test + public void getMessageTest() throws Exception { + sample.getMessage(); + } + + @Test + public void getMetadataTest() throws Exception { + sample.getMetadata(); + } + +}
\ No newline at end of file diff --git a/ceilometer-model/src/test/java/com/woorea/openstack/ceilometer/v2/model/StatisticsTest.java b/ceilometer-model/src/test/java/com/woorea/openstack/ceilometer/v2/model/StatisticsTest.java new file mode 100644 index 0000000..f38ec38 --- /dev/null +++ b/ceilometer-model/src/test/java/com/woorea/openstack/ceilometer/v2/model/StatisticsTest.java @@ -0,0 +1,79 @@ +/*- + * ============LICENSE_START======================================================= + * Licensed 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. + * ============LICENSE_END========================================================= + */ +package com.woorea.openstack.ceilometer.v2.model; + +import org.junit.Test; + +public class StatisticsTest { + + Statistics statistics = new Statistics(); + + @Test + public void getAvgTest() throws Exception { + statistics.getAvg(); + } + + @Test + public void getCountTest() throws Exception { + statistics.getCount(); + } + + @Test + public void getDurationTest() throws Exception { + statistics.getDuration(); + } + + @Test + public void getDurationStartTest() throws Exception { + statistics.getDurationStart(); + } + + @Test + public void getDurationEndTest() throws Exception { + statistics.getDurationEnd(); + } + + @Test + public void getMaxTest() throws Exception { + statistics.getMax(); + } + + @Test + public void getMinTest() throws Exception { + statistics.getMin(); + } + + @Test + public void getPeriodTest() throws Exception { + statistics.getPeriod(); + } + + @Test + public void getPeriodStartTest() throws Exception { + statistics.getPeriodStart(); + } + + @Test + public void getPeriodEndTest() throws Exception { + statistics.getPeriodEnd(); + } + + @Test + public void getSumTest() throws Exception { + statistics.getSum(); + } + +}
\ No newline at end of file |