Clean up IT and address Bug 3812
[neutron.git] / integration / test / src / test / java / org / opendaylight / neutron / e2etest / NeutronMeteringLabelTests.java
1 /*
2  * Copyright (C) 2015 IBM, Inc.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8
9 package org.opendaylight.neutron.e2etest;
10
11 import java.io.OutputStreamWriter;
12
13 import java.lang.Thread;
14
15 import java.net.HttpURLConnection;
16 import java.net.URL;
17
18 import org.junit.Assert;
19
20 public class NeutronMeteringLabelTests {
21     String base;
22
23     public NeutronMeteringLabelTests(String base) {
24         this.base = base;
25     }
26
27     public void meteringLabel_collection_get_test() {
28         String url = base + "/metering/metering-labels";
29         ITNeutronE2E.test_fetch(url, "Metering Label Collection GET failed");
30     }
31
32     //TODO handle SB check
33     public void singleton_meteringLabel_create_test() {
34         String url = base + "/metering/metering-labels";
35         String content = "{ \"metering_label\": { " +
36             "\"tenant_id\": \"45345b0ee1ea477fac0f541b2cb79cd4\", " +
37             "\"description\": \"description of label1\", " +
38             "\"name\": \"label1\", " +
39             "\"id\": \"bc91b832-8465-40a7-a5d8-ba87de442266\" } }";
40         ITNeutronE2E.test_create(url, content, "Singleton Metering Label Post Failed NB");
41     }
42 }