Skip to content

Commit

Permalink
Fix typos and adjust tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vogti committed Apr 19, 2024
1 parent ce0db61 commit 76b91f2
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 69 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/*
* Copyright 2019-2024 The Polypheny Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.polypheny.db.protointerface;

import static org.junit.jupiter.api.Assertions.assertThrows;

import java.util.HashMap;
import java.util.Map;
import org.junit.jupiter.api.Test;
import org.polypheny.db.type.entity.PolyString;
import org.polypheny.db.type.entity.PolyValue;


public class NamedValueProcessorTest {

@Test
public void replacePlaceholders__missingValue() {
assertThrows( PIServiceException.class, () -> {
final String statement = "select * from people where (first_name = :first_name or last_name= :last_name) and project = :project);";

final Map<String, PolyValue> values = new HashMap<>();
values.put( "first_name", PolyString.of( "tobias" ) );
values.put( "last_name", PolyString.of( "hafner" ) );

NamedValueProcessor namedValueProcessor = new NamedValueProcessor( statement );
} );
}

}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
import org.polypheny.db.type.entity.PolyBinary;
import org.polypheny.db.type.entity.PolyBoolean;
import org.polypheny.db.type.entity.PolyList;
import org.polypheny.db.type.entity.PolyLong;
import org.polypheny.db.type.entity.PolyNull;
import org.polypheny.db.type.entity.PolyString;
import org.polypheny.db.type.entity.PolyUserDefinedValue;
Expand All @@ -48,6 +47,7 @@
import org.polypheny.db.type.entity.numerical.PolyDouble;
import org.polypheny.db.type.entity.numerical.PolyFloat;
import org.polypheny.db.type.entity.numerical.PolyInteger;
import org.polypheny.db.type.entity.numerical.PolyLong;
import org.polypheny.db.type.entity.temporal.PolyDate;
import org.polypheny.db.type.entity.temporal.PolyTime;
import org.polypheny.db.type.entity.temporal.PolyTimestamp;
Expand Down Expand Up @@ -106,7 +106,7 @@ public static PolyUserDefinedValue buildTestUdt() {


@Test
public void polyBigDecimalSeriaizationTest() {
public void polyBigDecimalSerializationTest() {
BigDecimal expectedValue = new BigDecimal( 1691879380700L );
PolyBigDecimal expected = new PolyBigDecimal( expectedValue );
ProtoValue protoValue = PolyValueSerializer.serialize( expected );
Expand Down

0 comments on commit 76b91f2

Please sign in to comment.