Github user kchilton2 commented on a diff in the pull request:

    https://github.com/apache/incubator-rya/pull/237#discussion_r143051029
  
    --- Diff: 
common/rya.api/src/test/java/org/apache/rya/api/functions/DateTimeWithinTest.java
 ---
    @@ -0,0 +1,184 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you 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.apache.rya.api.functions;
    +
    +import static org.junit.Assert.assertEquals;
    +
    +import java.time.ZonedDateTime;
    +import java.time.format.DateTimeFormatter;
    +
    +import javax.xml.datatype.DatatypeConfigurationException;
    +import javax.xml.datatype.DatatypeFactory;
    +
    +import org.junit.Test;
    +import org.openrdf.model.Literal;
    +import org.openrdf.model.ValueFactory;
    +import org.openrdf.model.impl.ValueFactoryImpl;
    +import org.openrdf.query.algebra.evaluation.ValueExprEvaluationException;
    +
    +public class DateTimeWithinTest {
    +
    +    private static final ValueFactory vf = new ValueFactoryImpl();
    +    private static final Literal TRUE = vf.createLiteral(true);
    +    private static final Literal FALSE = vf.createLiteral(false);
    +
    +    @Test 
    +    public void testSeconds() throws DatatypeConfigurationException, 
ValueExprEvaluationException {
    +        DatatypeFactory dtf = DatatypeFactory.newInstance();
    +        
    +        ZonedDateTime zTime = ZonedDateTime.now();
    +        String time = zTime.format(DateTimeFormatter.ISO_INSTANT);
    +
    +        ZonedDateTime zTime1 = zTime.minusSeconds(1);
    --- End diff --
    
    Maybe call this oneSecondEarlierZTime?


---

Reply via email to