You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2021/08/13 16:23:50 UTC
[commons-pool] branch master updated: Add missing test.
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-pool.git
The following commit(s) were added to refs/heads/master by this push:
new 748323b Add missing test.
748323b is described below
commit 748323bc7e8e9200777a0c0ac2ab5f941aa430be
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Fri Aug 13 12:23:48 2021 -0400
Add missing test.
---
.../org/apache/commons/pool2/TestTrackedUse.java | 41 ++++++++++++++++++++++
1 file changed, 41 insertions(+)
diff --git a/src/test/java/org/apache/commons/pool2/TestTrackedUse.java b/src/test/java/org/apache/commons/pool2/TestTrackedUse.java
new file mode 100644
index 0000000..421ee70
--- /dev/null
+++ b/src/test/java/org/apache/commons/pool2/TestTrackedUse.java
@@ -0,0 +1,41 @@
+/*
+ * 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.commons.pool2;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+import java.time.Instant;
+
+import org.junit.jupiter.api.Test;
+
+public class TestTrackedUse {
+
+ class DefaultTrackedUse implements TrackedUse {
+
+ @Override
+ public long getLastUsed() {
+ return 1;
+ }
+
+ }
+
+ @Test
+ public void testDefaultGetLastUsedInstant() {
+ assertEquals(Instant.ofEpochMilli(1), new DefaultTrackedUse().getLastUsedInstant());
+ }
+}