RestletCrestRealmRouterTest.java revision a329900f13c59aa829b6b857a5e96119d249880c
/*
* 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 legal/CDDLv1.0.txt. See the License for the
* specific language governing permission and limitations under the License.
*
* When distributing Covered Software, include this CDDL Header Notice in each file and include
* the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
* Header, with the fields enclosed by brackets [] replaced by your own identifying
* information: "Portions copyright [year] [name of copyright owner]".
*
* Copyright 2014 ForgeRock AS.
*/
public class RestletCrestRealmRouterTest {
private Connection connection;
private CollectionResourceProvider usersProvider;
private CollectionResourceProvider groupsProvider;
private void setUpClass() {
}
public void setUp() {
}
return new ServerContext(securityContext);
}
private Object[][] dataProvider() {
return new Object[][]{
};
}
public void shouldCreateFromRealm(String resourceContainer, String resourceName, String expectedRealm,
//Given
//When
connection.create(ctx(), Requests.newCreateRequest(resourceContainer, resourceName, json(object())));
//Then
verify(expectedProvider).createInstance(contextCaptor.capture(), Matchers.<CreateRequest>anyObject(),
}
public void shouldReadFromRealm(String resourceContainer, String resourceName, String expectedRealm,
//Given
//When
//Then
}
public void shouldUpdateFromRealm(String resourceContainer, String resourceName, String expectedRealm,
//Given
//When
connection.update(ctx(), Requests.newUpdateRequest(resourceContainer, resourceName, json(object())));
//Then
}
public void shouldDeleteFromRealm(String resourceContainer, String resourceName, String expectedRealm,
//Given
//When
//Then
}
public void shouldPatchFromRealm(String resourceContainer, String resourceName, String expectedRealm,
//Given
//When
//Then
}
public void shouldActionFromRealm(String resourceContainer, String resourceName, String expectedRealm,
//Given
//When
//Then
}
public void shouldQueryFromRealm(String resourceContainer, String resourceName, String expectedRealm,
//Given
//When
//Then
verify(expectedProvider).queryCollection(contextCaptor.capture(), Matchers.<QueryRequest>anyObject(),
}
return new CollectionResourceProvider() {
}
}
public void createInstance(ServerContext context, CreateRequest request, ResultHandler<Resource> handler) {
}
}
}
public void queryCollection(ServerContext context, QueryRequest request, QueryResultHandler handler) {
}
}
}
};
}
}