Search in sources :

Example 36 with ModelId

use of org.eclipse.vorto.repository.api.ModelId in project vorto by eclipse.

the class ModelRepositoryClientTest method testPublishModel.

@Test
@Ignore
public void testPublishModel() throws Exception {
    File uploadableFile = new File("src/test/resources/Color3.type");
    ModelId uploadedModelId = publisher.publish(ModelType.Datatype, FileUtils.readFileToString(uploadableFile));
    assertEquals(new ModelId("Color", "demo", "1.0.0"), uploadedModelId);
}
Also used : File(java.io.File) ModelId(org.eclipse.vorto.repository.api.ModelId) Ignore(org.junit.Ignore) Test(org.junit.Test)

Aggregations

ModelId (org.eclipse.vorto.repository.api.ModelId)36 ModelInfo (org.eclipse.vorto.repository.api.ModelInfo)12 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)11 ApiOperation (io.swagger.annotations.ApiOperation)10 IOException (java.io.IOException)10 ApiResponses (io.swagger.annotations.ApiResponses)9 Test (org.junit.Test)9 ModelNotFoundException (org.eclipse.vorto.repository.api.exception.ModelNotFoundException)8 AbstractIntegrationTest (org.eclipse.vorto.repository.AbstractIntegrationTest)7 ByteArrayInputStream (java.io.ByteArrayInputStream)6 MappingModel (org.eclipse.vorto.core.api.model.mapping.MappingModel)6 ContentType (org.eclipse.vorto.repository.core.IModelRepository.ContentType)6 UnsupportedEncodingException (java.io.UnsupportedEncodingException)5 UploadTooLargeException (org.eclipse.vorto.repository.web.core.exceptions.UploadTooLargeException)5 ByteArrayOutputStream (java.io.ByteArrayOutputStream)4 Optional (java.util.Optional)4 ZipEntry (java.util.zip.ZipEntry)4 ZipOutputStream (java.util.zip.ZipOutputStream)4 MappingRule (org.eclipse.vorto.core.api.model.mapping.MappingRule)4 StereoTypeTarget (org.eclipse.vorto.core.api.model.mapping.StereoTypeTarget)4