Exemplo n.º 1
0
 @Override
 public void execute(VirtualUser virtualUser)
     throws ServerException, UserException, PublicInterfaceNotFoundException {
   String name = "Project " + randomString();
   virtualUser.getActionResults().setText("Creating new project " + name);
   virtualUser.getBimServerClient().getBimsie1ServiceInterface().addProject(name);
 }
Exemplo n.º 2
0
 @Override
 public void execute(VirtualUser virtualUser)
     throws ServerException, UserException, PublicInterfaceNotFoundException {
   SProject project = virtualUser.getRandomProject();
   virtualUser.getLogger().info("Changing settings of project " + project.getName());
   project.setDescription(randomString());
   project.setExportLengthMeasurePrefix(SSIPrefix.values()[nextInt(SSIPrefix.values().length)]);
   project.setName(randomString());
   virtualUser.getBimServerClient().getServiceInterface().updateProject(project);
 }
 @Override
 public void execute(VirtualUser virtualUser)
     throws ServerException, UserException, PublicInterfaceNotFoundException {
   SRevision randomRevision = virtualUser.getRandomRevision();
   if (randomRevision != null) {
     IfcModelInterface model;
     try {
       SProject project =
           virtualUser
               .getBimServerClient()
               .getBimsie1ServiceInterface()
               .getProjectByPoid(randomRevision.getProjectId());
       model =
           virtualUser
               .getBimServerClient()
               .getModel(project, randomRevision.getOid(), true, false);
       PluginManager pluginManager = getTestFramework().getPluginManager();
       SerializerPlugin serializerPlugin =
           pluginManager.getSerializerPlugin(
               "org.bimserver.ifc.step.serializer.IfcStepSerializerPlugin", true);
       Serializer serializer = serializerPlugin.createSerializer(new PluginConfiguration());
       model.generateMinimalExpressIds();
       serializer.init(
           model, null, pluginManager, pluginManager.requireRenderEngine(), null, false);
       serializer.writeToFile(
           new File(getTestFramework().getTestConfiguration().getOutputFolder(), "test.ifc"),
           null);
     } catch (BimServerClientException e1) {
       e1.printStackTrace();
     } catch (RenderEngineException e) {
       e.printStackTrace();
     } catch (PluginException e) {
       e.printStackTrace();
     } catch (SerializerException e) {
       e.printStackTrace();
     }
   }
 }