Search in sources :

Example 16 with String_ValueMapEntry

use of com.google.api.ads.admanager.axis.v202205.String_ValueMapEntry in project googleads-java-lib by googleads.

the class StatementBuilderTest method testBindVariables_number.

@Test
public void testBindVariables_number() {
    StatementBuilder statementBuilder = new StatementBuilder();
    Statement statement = statementBuilder.where("number = :number").withBindVariableValue("number", 1).toStatement();
    String_ValueMapEntry entry = statement.getValues(0);
    assertEquals("number", entry.getKey());
    assertEquals(NumberValue.class, entry.getValue().getClass());
    assertEquals("1", ((NumberValue) entry.getValue()).getValue());
}
Also used : String_ValueMapEntry(com.google.api.ads.admanager.axis.v202111.String_ValueMapEntry) Statement(com.google.api.ads.admanager.axis.v202111.Statement) Test(org.junit.Test)

Example 17 with String_ValueMapEntry

use of com.google.api.ads.admanager.axis.v202205.String_ValueMapEntry in project googleads-java-lib by googleads.

the class StatementBuilderTest method testBindVariables_bool.

@Test
public void testBindVariables_bool() {
    StatementBuilder statementBuilder = new StatementBuilder();
    Statement statement = statementBuilder.where("bool = :bool").withBindVariableValue("bool", true).toStatement();
    String_ValueMapEntry entry = statement.getValues(0);
    assertEquals("bool", entry.getKey());
    assertEquals(BooleanValue.class, entry.getValue().getClass());
    assertEquals(true, ((BooleanValue) entry.getValue()).getValue());
}
Also used : String_ValueMapEntry(com.google.api.ads.admanager.axis.v202111.String_ValueMapEntry) Statement(com.google.api.ads.admanager.axis.v202111.Statement) Test(org.junit.Test)

Example 18 with String_ValueMapEntry

use of com.google.api.ads.admanager.axis.v202205.String_ValueMapEntry in project googleads-java-lib by googleads.

the class StatementBuilderTest method testBindVariables_text.

@Test
public void testBindVariables_text() {
    StatementBuilder statementBuilder = new StatementBuilder();
    Statement statement = statementBuilder.where("text = :text").withBindVariableValue("text", "foo").toStatement();
    String_ValueMapEntry entry = statement.getValues(0);
    assertEquals("text", entry.getKey());
    assertEquals(TextValue.class, entry.getValue().getClass());
    assertEquals("foo", ((TextValue) entry.getValue()).getValue());
}
Also used : String_ValueMapEntry(com.google.api.ads.admanager.axis.v202205.String_ValueMapEntry) Statement(com.google.api.ads.admanager.axis.v202205.Statement) Test(org.junit.Test)

Example 19 with String_ValueMapEntry

use of com.google.api.ads.admanager.axis.v202205.String_ValueMapEntry in project googleads-java-lib by googleads.

the class StatementBuilderTest method testBindVariables_bool.

@Test
public void testBindVariables_bool() {
    StatementBuilder statementBuilder = new StatementBuilder();
    Statement statement = statementBuilder.where("bool = :bool").withBindVariableValue("bool", true).toStatement();
    String_ValueMapEntry entry = statement.getValues(0);
    assertEquals("bool", entry.getKey());
    assertEquals(BooleanValue.class, entry.getValue().getClass());
    assertEquals(true, ((BooleanValue) entry.getValue()).getValue());
}
Also used : String_ValueMapEntry(com.google.api.ads.admanager.axis.v202205.String_ValueMapEntry) Statement(com.google.api.ads.admanager.axis.v202205.Statement) Test(org.junit.Test)

Example 20 with String_ValueMapEntry

use of com.google.api.ads.admanager.axis.v202205.String_ValueMapEntry in project googleads-java-lib by googleads.

the class StatementBuilderTest method testBindVariables_number.

@Test
public void testBindVariables_number() {
    StatementBuilder statementBuilder = new StatementBuilder();
    Statement statement = statementBuilder.where("number = :number").withBindVariableValue("number", 1).toStatement();
    String_ValueMapEntry entry = statement.getValues(0);
    assertEquals("number", entry.getKey());
    assertEquals(NumberValue.class, entry.getValue().getClass());
    assertEquals("1", ((NumberValue) entry.getValue()).getValue());
}
Also used : String_ValueMapEntry(com.google.api.ads.admanager.axis.v202205.String_ValueMapEntry) Statement(com.google.api.ads.admanager.axis.v202205.Statement) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)15 Statement (com.google.api.ads.admanager.axis.v202105.Statement)4 String_ValueMapEntry (com.google.api.ads.admanager.axis.v202105.String_ValueMapEntry)4 Statement (com.google.api.ads.admanager.axis.v202108.Statement)4 String_ValueMapEntry (com.google.api.ads.admanager.axis.v202108.String_ValueMapEntry)4 Statement (com.google.api.ads.admanager.axis.v202111.Statement)4 String_ValueMapEntry (com.google.api.ads.admanager.axis.v202111.String_ValueMapEntry)4 Statement (com.google.api.ads.admanager.axis.v202202.Statement)4 String_ValueMapEntry (com.google.api.ads.admanager.axis.v202202.String_ValueMapEntry)4 Statement (com.google.api.ads.admanager.axis.v202205.Statement)4 String_ValueMapEntry (com.google.api.ads.admanager.axis.v202205.String_ValueMapEntry)4