use of ru.ydn.wicket.wicketorientdb.model.OClassModel in project wicket-orientdb by OrienteerBAP.
the class TestModels method testOPropertyNamingModel.
@Test
public void testOPropertyNamingModel() {
IModel<String> classNameModel = Model.of("OUser");
IModel<OClass> oClassModel = new OClassModel(classNameModel);
IModel<OProperty> propertyModel = new OPropertyModel(oClassModel, "name");
OPropertyNamingModel model = new OPropertyNamingModel(propertyModel);
assertModelObjectEquals("Name", model);
model.detach();
classNameModel.setObject("ORole");
assertModelObjectEquals("Role Name", model);
}
use of ru.ydn.wicket.wicketorientdb.model.OClassModel in project wicket-orientdb by OrienteerBAP.
the class TestModels method testOClassNamingModel.
@Test
public void testOClassNamingModel() {
IModel<String> classNameModel = Model.of("OUser");
IModel<OClass> oClassModel = new OClassModel(classNameModel);
OClassNamingModel model = new OClassNamingModel(oClassModel);
assertModelObjectEquals("OUser", model);
model.detach();
classNameModel.setObject("ORole");
assertModelObjectEquals("SuperRole", model);
}
use of ru.ydn.wicket.wicketorientdb.model.OClassModel in project wicket-orientdb by OrienteerBAP.
the class TestModels method testOClassModel.
@Test
public void testOClassModel() {
OClassModel model = new OClassModel("OUser");
OClass oUserClass = wicket.getTester().getSchema().getClass("OUser");
assertModelObjectEquals(oUserClass, model);
// Test for null
model.setObject(null);
assertModelObjectEquals(null, model);
// Test for classRename
OClass newClass = wicket.getTester().getSchema().createClass("TestRenameOClass");
model.setObject(newClass);
assertModelObjectEquals(newClass, model);
newClass.setName("TestRenameOClassRenamed");
assertModelObjectEquals(newClass, model);
}
Aggregations