public void testHeritageMultiple() { Cache cache = initWorkingSpace(); Type vehicle = cache.addType("Vehicle"); Type human = cache.addType("Human"); vehicle.addSubType("Transformer", new Generic[] {human}); closingWorkingSpace(cache); }
public void testCustomTypeAndItsInstance() { Cache cache = initWorkingSpace(); Type vehicle = cache.addType("Vehicle"); Attribute equipment = vehicle.setAttribute("Equipment"); Generic myVehicle = vehicle.addInstance("myVehicle"); myVehicle.setValue(equipment, "ABS"); closingWorkingSpace(cache); }
public void testLink() { Cache cache = initWorkingSpace(); Type vehicle = cache.addType("Vehicle"); Type color = cache.addType("Color"); Relation vehicleColor = vehicle.setRelation("VehicleColor", color); Generic myVehicle = vehicle.addInstance("myVehicle"); Generic red = color.addInstance("red"); myVehicle.setLink(vehicleColor, "myVehicleRed", red); closingWorkingSpace(cache); }
public void testAddAndRemove() { Cache cache = initWorkingSpace(); Type vehicle = cache.addType("Vehicle"); Type car = vehicle.addSubType("Car"); Type truck = vehicle.addSubType("Truck"); truck.addSubType("Van"); car.remove(); closingWorkingSpace(cache); }
public void testHeritage() { Cache cache = initWorkingSpace(); Type vehicle = cache.addType("Vehicle"); vehicle.addSubType("Car"); closingWorkingSpace(cache); }