Search in sources :

Example 96 with com.google.api.services.sheets.v4.model

use of com.google.api.services.sheets.v4.model in project xtext-core by eclipse.

the class Bug250313Test method testIDConversion_01.

@Test
public void testIDConversion_01() throws Exception {
    Model model = (Model) getModel("1 str");
    assertEquals("str", model.getValue());
    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)

Example 97 with com.google.api.services.sheets.v4.model

use of com.google.api.services.sheets.v4.model in project xtext-core by eclipse.

the class Bug250313Test method testDatatypeConversion_05.

@Test
public void testDatatypeConversion_05() throws Exception {
    Model model = (Model) getModel("3+ foo - bar");
    assertEquals("[str]", model.getMultiValue().toString());
    assertEquals("org.eclipse.xtext.valueconverter.Bug250313.Datatype", lexerRule);
    assertTrue(node instanceof ICompositeNode);
    assertEquals(6, Iterables.size(((ICompositeNode) node).getChildren()));
    assertEquals("foo - bar", string);
    assertEquals(1, convertCallCount);
}
Also used : Model(org.eclipse.xtext.valueconverter.bug250313.Model) ICompositeNode(org.eclipse.xtext.nodemodel.ICompositeNode) Test(org.junit.Test)

Example 98 with com.google.api.services.sheets.v4.model

use of com.google.api.services.sheets.v4.model in project xtext-core by eclipse.

the class Bug250313Test method testNestedDatatypeConversion_07.

@Test
public void testNestedDatatypeConversion_07() throws Exception {
    Model model = (Model) getModel("1+ zonk + foo - bar");
    assertEquals("[str]", model.getMultiValue().toString());
    assertEquals("org.eclipse.xtext.valueconverter.Bug250313.NestedDatatype", lexerRule);
    assertTrue(node instanceof ICompositeNode);
    assertEquals(5, Iterables.size(((ICompositeNode) node).getChildren()));
    assertEquals("zonk + foo - bar", string);
    assertEquals(1, convertCallCount);
}
Also used : Model(org.eclipse.xtext.valueconverter.bug250313.Model) ICompositeNode(org.eclipse.xtext.nodemodel.ICompositeNode) Test(org.junit.Test)

Example 99 with com.google.api.services.sheets.v4.model

use of com.google.api.services.sheets.v4.model in project xtext-core by eclipse.

the class Bug250313Test method testNestedDatatypeConversion_08.

@Test
public void testNestedDatatypeConversion_08() throws Exception {
    Model model = (Model) getModel("1+ zonk +");
    assertEquals("[str]", model.getMultiValue().toString());
    assertEquals("org.eclipse.xtext.valueconverter.Bug250313.NestedDatatype", lexerRule);
    assertTrue(node instanceof ICompositeNode);
    assertEquals(4, Iterables.size(((ICompositeNode) node).getChildren()));
    assertEquals("zonk +", string);
    assertEquals(1, convertCallCount);
}
Also used : Model(org.eclipse.xtext.valueconverter.bug250313.Model) ICompositeNode(org.eclipse.xtext.nodemodel.ICompositeNode) Test(org.junit.Test)

Example 100 with com.google.api.services.sheets.v4.model

use of com.google.api.services.sheets.v4.model in project xtext-core by eclipse.

the class Bug250313Test method testNestedDatatypeConversion_02.

@Test
public void testNestedDatatypeConversion_02() throws Exception {
    Model model = (Model) getModel("1 zonk +");
    assertEquals("str", model.getValue());
    assertEquals("org.eclipse.xtext.valueconverter.Bug250313.NestedDatatype", lexerRule);
    assertTrue(node instanceof ICompositeNode);
    assertEquals(4, Iterables.size(((ICompositeNode) node).getChildren()));
    assertEquals("zonk +", string);
    assertEquals(1, convertCallCount);
}
Also used : Model(org.eclipse.xtext.valueconverter.bug250313.Model) ICompositeNode(org.eclipse.xtext.nodemodel.ICompositeNode) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)77 Model (org.eclipse.xtext.valueconverter.bug250313.Model)30 Exchange (org.apache.camel.Exchange)29 DefaultExchange (org.apache.camel.support.DefaultExchange)29 ArrayList (java.util.ArrayList)20 HashMap (java.util.HashMap)19 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 BatchUpdateSpreadsheetRequest (com.google.api.services.sheets.v4.model.BatchUpdateSpreadsheetRequest)14 ValueRange (com.google.api.services.sheets.v4.model.ValueRange)14 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 FilterSplit (com.google.cloud.aiplatform.v1.FilterSplit)11 FractionSplit (com.google.cloud.aiplatform.v1.FractionSplit)11