2 * Copyright (C) 2014 EBay Software Foundation
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
8 * Authors : Ashwin Raveendran
10 package org.opendaylight.ovsdb.lib.schema;
12 import com.fasterxml.jackson.databind.JsonNode;
13 import com.fasterxml.jackson.databind.ObjectMapper;
14 import org.junit.Test;
15 import static org.junit.Assert.assertNotNull;
16 import java.io.IOException;
17 import java.io.InputStream;
20 public class OvsDBSchemaTest {
23 public void testSchema() throws IOException {
24 InputStream resourceAsStream = OvsDBSchemaTest.class.getResourceAsStream("test_schema.json");
25 ObjectMapper mapper = new ObjectMapper();
26 JsonNode jsonNode = mapper.readTree(resourceAsStream);
27 System.out.println("jsonNode = " + jsonNode.get("id"));
29 DatabaseSchema schema = DatabaseSchema.fromJson(jsonNode.get("result"));
30 assertNotNull(schema);