OrientDBRepoServiceTest.java revision 8d1791bef30ee93b0616a90971b348dd808a74ea
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2013 ForgeRock AS. All Rights Reserved
*
* The contents of this file are subject to the terms
* of the Common Development and Distribution License
* (the License). You may not use this file except in
* compliance with the License.
*
* You can obtain a copy of the License at
* See the License for the specific language governing
* permission and limitations under the License.
*
* When distributing Covered Code, include this CDDL
* Header Notice in each file and include the License file
* If applicable, add the following below the CDDL Header,
* with the fields enclosed by brackets [] replaced by
* your own identifying information:
* "Portions Copyrighted [year] [name of copyright owner]"
*/
/**
* A NAME does ...
*
* @author Laszlo Hordos
*/
public class OrientDBRepoServiceTest {
try {
try {
.toString();
}
} catch (UnsupportedEncodingException e) {
/* ignore */
}
}
return null;
}
});
} catch (IllegalStateException e) {
/* ignore */
}
// Test#1
// Test#2
}
private final JsonValue configuration;
private Connection connection;
private OrientDBRepoService repoService;
this.configuration = configuration;
}
"utf-8");
URL[] subclasses =
new URL[] {
};
final URLClassLoader loader =
fail();
}
}
// stubbing
repoService = new OrientDBRepoService();
}
} else {
"7A5DEAB30884B4C8026A047F13D4A67BDEDC7CA227AA8F4D477727EABE5541B4");
"7A5DEAB30884B4C8026A047F13D4A67BDEDC7CA227AA8F4D477727EABE5541B4" });
}
}
@Test
public void testHandlePatch() throws Exception {
.doesNotContainKey("string");
}
@Test
public void testHandleRead() throws Exception {
}
@Test
public void testHandleQuery() throws Exception {
}
public void testHandleReadNonExisting() throws Exception {
}
public void testHandleReadNonExistingClass() throws Exception {
}
@Test
public void testHandleCreate() throws Exception {
// Request#1
// Request#2
try {
fail("id must be '1'");
} catch (IllegalArgumentException e) {
/* expected */
}
// Request#3
// Request#4 - Already exits
try {
} catch (ConflictException e) {
}
// Request#5 - Route is /repo/{partition}
try {
} catch (NotFoundException e) {
}
}
@Test
public void testHandleUpdate() throws Exception {
}
@Test
public void testHandleDelete() throws Exception {
// This request is wrong but we should handle it.
}
public void testHandleDeleteWithWrongVersion() throws Exception {
}
public void testHandleDeleteNonExisting() throws Exception {
try {
} catch (Exception e) {
}
}
@Test
public void testOServerConfiguration() throws Exception {
OrientDBRepoServiceTest.class
try {
file =
.getPath(), "utf-8")
+ "/orientdb-server-config.json");
// if file does not exists, then create it
}
// get the content in bytes
byte[] contentInBytes =
} finally {
try {
}
} catch (IOException e) {
/* ignore */
}
}
}
private JsonValue newContent() {
return object;
}
return map;
}
super("Resource must match!");
}
}
}
}
}
}
private static class IsolatedClassLoader extends URLClassLoader {
}
/**
* Overrides <code>super.loadClass()</code>, to change loading model to
* child-first.
*/
throws ClassNotFoundException {
if (c == null) {
try {
} catch (ClassNotFoundException ex) {
}
}
if (resolve) {
resolveClass(c);
}
return c;
}
}
}