Search in sources :

Example 31 with com.amazonaws.services.s3.model

use of com.amazonaws.services.s3.model in project xtext-core by eclipse.

the class Bug299395Test method testSerialization_05.

@Test
public void testSerialization_05() {
    Model model = Bug299395Factory.eINSTANCE.createModel();
    model.getStrings().add("Unused");
    model.getKeys().add("Key1");
    model.getValues().add("Value1");
    model.getKeys().add("Key2");
    model.getValues().add("Value2");
    String serialized = getSerializer().serialize(model);
    assertEquals("{ \"Unused\" } [ \"Key1\" \"Value1\" \"Key2\" \"Value2\" ]", serialized);
}
Also used : Model(org.eclipse.xtext.parsetree.reconstr.bug299395.Model) SubModel(org.eclipse.xtext.parsetree.reconstr.bug299395.SubModel) Test(org.junit.Test)

Example 32 with com.amazonaws.services.s3.model

use of com.amazonaws.services.s3.model in project xtext-core by eclipse.

the class Bug299395Test method testSerialization_06.

@Test
public void testSerialization_06() {
    Model model = Bug299395Factory.eINSTANCE.createModel();
    SubModel subModel = Bug299395Factory.eINSTANCE.createSubModel();
    model.setSubModel(subModel);
    String serialized = getSerializer().serialize(model);
    assertEquals("subModel", serialized);
}
Also used : Model(org.eclipse.xtext.parsetree.reconstr.bug299395.Model) SubModel(org.eclipse.xtext.parsetree.reconstr.bug299395.SubModel) SubModel(org.eclipse.xtext.parsetree.reconstr.bug299395.SubModel) Test(org.junit.Test)

Example 33 with com.amazonaws.services.s3.model

use of com.amazonaws.services.s3.model in project xtext-core by eclipse.

the class Bug299395Test method testSerialization_02.

@Test
public void testSerialization_02() {
    Model model = Bug299395Factory.eINSTANCE.createModel();
    model.getStrings().add("Foo");
    String serialized = getSerializer().serialize(model);
    assertEquals("{ \"Foo\" }", serialized);
}
Also used : Model(org.eclipse.xtext.parsetree.reconstr.bug299395.Model) SubModel(org.eclipse.xtext.parsetree.reconstr.bug299395.SubModel) Test(org.junit.Test)

Example 34 with com.amazonaws.services.s3.model

use of com.amazonaws.services.s3.model in project xtext-core by eclipse.

the class Bug302128Test method testTheBug2.

@Test
public void testTheBug2() throws Exception {
    with(new Bug302128TestLanguageStandaloneSetup());
    String text = "VARIABLE += value.val value2.val\n" + "VARIABLE2 += value3.val value4.val\n\n" + "#Comment comment comment\n\n" + "VARIABLE3 += value5.val value6.val\n" + "VARIABLE4 += value.val value2.val\n" + "VARIABLE5 += value3.val value4.val\n\n" + "#Comment comment comment\n\n" + "VARIABLE.varible += value5.val value6.val\n";
    XtextResource resource = getResource(new StringInputStream(text));
    Model model = (Model) resource.getContents().get(0);
    model.getElements().get(2).setValue("+= value5.val value6.val\n");
    ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
    resource.save(outputStream, null);
    assertEquals(text, new String(outputStream.toByteArray()));
}
Also used : StringInputStream(org.eclipse.xtext.util.StringInputStream) Model(org.eclipse.xtext.parsetree.reconstr.bug302128.Model) XtextResource(org.eclipse.xtext.resource.XtextResource) ByteArrayOutputStream(java.io.ByteArrayOutputStream) Test(org.junit.Test)

Example 35 with com.amazonaws.services.s3.model

use of com.amazonaws.services.s3.model in project xtext-core by eclipse.

the class Bug250313Test method testIDConversion_06.

@Test
public void testIDConversion_06() throws Exception {
    Model model = (Model) getModel("1+ ^str");
    assertEquals("[str]", model.getMultiValue().toString());
    assertEquals("org.eclipse.xtext.common.Terminals.ID", lexerRule);
    assertTrue(node instanceof ILeafNode);
    assertEquals("^str", string);
    assertEquals(1, convertCallCount);
}
Also used : ILeafNode(org.eclipse.xtext.nodemodel.ILeafNode) Model(org.eclipse.xtext.valueconverter.bug250313.Model) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)49 Model (org.eclipse.xtext.valueconverter.bug250313.Model)30 Model (com.google.cloud.aiplatform.v1.Model)16 AutoMlClient (com.google.cloud.automl.v1.AutoMlClient)16 Model (com.google.cloud.automl.v1.Model)16 ICompositeNode (org.eclipse.xtext.nodemodel.ICompositeNode)16 LocationName (com.google.cloud.aiplatform.v1.LocationName)14 PipelineServiceClient (com.google.cloud.aiplatform.v1.PipelineServiceClient)14 PipelineServiceSettings (com.google.cloud.aiplatform.v1.PipelineServiceSettings)14 TrainingPipeline (com.google.cloud.aiplatform.v1.TrainingPipeline)14 InputDataConfig (com.google.cloud.aiplatform.v1.InputDataConfig)13 ModelContainerSpec (com.google.cloud.aiplatform.v1.ModelContainerSpec)13 ByteArrayInputStream (java.io.ByteArrayInputStream)13 FilterSplit (com.google.cloud.aiplatform.v1.FilterSplit)11 FractionSplit (com.google.cloud.aiplatform.v1.FractionSplit)11 PredefinedSplit (com.google.cloud.aiplatform.v1.PredefinedSplit)11 TimestampSplit (com.google.cloud.aiplatform.v1.TimestampSplit)11 Status (com.google.rpc.Status)11 Model (com.microsoft.z3.Model)11 IOException (java.io.IOException)11