From 2e91cbe1aeea04737a86fcb7183b5c06a61a3f12 Mon Sep 17 00:00:00 2001 From: Daan Hoogland Date: Wed, 18 Dec 2013 14:30:26 +0100 Subject: [PATCH] rats --- .../com/cloud/usage/UsageSanityCheckerIT.java | 37 +++++++++++++------ .../cloud/usage/UsageSanityCheckerTest.java | 22 +++++++++-- usage/test/resources/cloud1.xml | 9 +++++ usage/test/resources/cloud2.xml | 9 +++++ usage/test/resources/cloud3.xml | 9 +++++ usage/test/resources/cloud_usage1.xml | 9 +++++ usage/test/resources/cloud_usage2.xml | 9 +++++ usage/test/resources/cloud_usage3.xml | 9 +++++ 8 files changed, 99 insertions(+), 14 deletions(-) diff --git a/usage/test/com/cloud/usage/UsageSanityCheckerIT.java b/usage/test/com/cloud/usage/UsageSanityCheckerIT.java index 412bebc6106..d8a65800018 100644 --- a/usage/test/com/cloud/usage/UsageSanityCheckerIT.java +++ b/usage/test/com/cloud/usage/UsageSanityCheckerIT.java @@ -1,14 +1,37 @@ +// 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 +// 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 com.cloud.usage; +import static org.junit.Assert.assertEquals; + +import java.io.FileNotFoundException; +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.SQLException; +import java.util.Arrays; +import java.util.Collection; +import java.util.Properties; + import org.dbunit.DatabaseUnitException; import org.dbunit.dataset.DataSetException; import org.dbunit.dataset.IDataSet; import org.dbunit.dataset.xml.FlatXmlDataSetBuilder; import org.dbunit.ext.mysql.MySqlConnection; import org.dbunit.operation.DatabaseOperation; - -import static org.junit.Assert.assertEquals; - import org.junit.After; import org.junit.Before; import org.junit.Test; @@ -19,14 +42,6 @@ import org.mockito.Mockito; import com.cloud.utils.PropertiesUtil; -import java.io.FileNotFoundException; -import java.sql.Connection; -import java.sql.DriverManager; -import java.sql.SQLException; -import java.util.Arrays; -import java.util.Collection; -import java.util.Properties; - @RunWith(Parameterized.class) public class UsageSanityCheckerIT{ diff --git a/usage/test/com/cloud/usage/UsageSanityCheckerTest.java b/usage/test/com/cloud/usage/UsageSanityCheckerTest.java index 346a8ad3cdb..69e3ea18acc 100644 --- a/usage/test/com/cloud/usage/UsageSanityCheckerTest.java +++ b/usage/test/com/cloud/usage/UsageSanityCheckerTest.java @@ -1,8 +1,21 @@ +// 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 +// 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 com.cloud.usage; -import org.junit.Test; -import org.mockito.Mockito; - import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; @@ -12,6 +25,9 @@ import java.util.regex.Pattern; import junit.framework.TestCase; +import org.junit.Test; +import org.mockito.Mockito; + public class UsageSanityCheckerTest extends TestCase { @Test diff --git a/usage/test/resources/cloud1.xml b/usage/test/resources/cloud1.xml index e56ed073e01..e148c581e9e 100644 --- a/usage/test/resources/cloud1.xml +++ b/usage/test/resources/cloud1.xml @@ -1,3 +1,12 @@ + diff --git a/usage/test/resources/cloud2.xml b/usage/test/resources/cloud2.xml index e56ed073e01..e148c581e9e 100644 --- a/usage/test/resources/cloud2.xml +++ b/usage/test/resources/cloud2.xml @@ -1,3 +1,12 @@ + diff --git a/usage/test/resources/cloud3.xml b/usage/test/resources/cloud3.xml index 6e7a7453d06..4188c1c2ff1 100644 --- a/usage/test/resources/cloud3.xml +++ b/usage/test/resources/cloud3.xml @@ -1,3 +1,12 @@ + diff --git a/usage/test/resources/cloud_usage1.xml b/usage/test/resources/cloud_usage1.xml index aaad17d3322..20528bf2aab 100644 --- a/usage/test/resources/cloud_usage1.xml +++ b/usage/test/resources/cloud_usage1.xml @@ -1,3 +1,12 @@ + diff --git a/usage/test/resources/cloud_usage2.xml b/usage/test/resources/cloud_usage2.xml index d87d05a8734..7cc3991ed1a 100644 --- a/usage/test/resources/cloud_usage2.xml +++ b/usage/test/resources/cloud_usage2.xml @@ -1,3 +1,12 @@ + diff --git a/usage/test/resources/cloud_usage3.xml b/usage/test/resources/cloud_usage3.xml index 332ddfc2496..d8922e1f01e 100644 --- a/usage/test/resources/cloud_usage3.xml +++ b/usage/test/resources/cloud_usage3.xml @@ -1,3 +1,12 @@ +