From d18884416b923c2aa23f0ed67582f32260c743b7 Mon Sep 17 00:00:00 2001 From: Youp Hendriks Date: Wed, 21 Feb 2024 12:17:19 +0100 Subject: [PATCH 1/6] Fixed Maven central hyperlink in readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a0e1267b3..f4c573fd6 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ Using BridgeDb dependencies --------------------------- The [BridgeDb releases](https://github.com/bridgedb/BridgeDb/releases) are published to -[Maven Central](http://central.maven.org/maven2/org/bridgedb/), which means you can use the BridgeDb JARs without needing to compile BridgeDb. +[Maven Central](https://search.maven.org/artifact/org.bridgedb/bridgedb-bundle), which means you can use the BridgeDb JARs without needing to compile BridgeDb. Usage depends on which module you require. The examples below assumes artifact `org.bridgedb.bio` and version `3.0.25`: From 415d65cf2f610efe02e37e1fceea11fbd1f61a21 Mon Sep 17 00:00:00 2001 From: Youp Hendriks Date: Wed, 21 Feb 2024 15:45:23 +0100 Subject: [PATCH 2/6] Test commit --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f4c573fd6..4bf5aead2 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ BridgeDb ======== - +TEST [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.593034.svg)](https://doi.org/10.5281/zenodo.593034) [![Actions Status](https://github.com/bridgedb/BridgeDb/workflows/build/badge.svg)](https://github.com/bridgedb/BridgeDb/actions) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.bridgedb/bridgedb-bundle/badge.svg)](https://maven-badges.herokuapp.com/maven-central/org.bridgedb/bridgedb-bundle) From f218237adb64d2d09c192bed75bd064686633fe2 Mon Sep 17 00:00:00 2001 From: Youp Hendriks Date: Wed, 21 Feb 2024 15:57:08 +0100 Subject: [PATCH 3/6] Undo test --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4bf5aead2..f4c573fd6 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ BridgeDb ======== -TEST + [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.593034.svg)](https://doi.org/10.5281/zenodo.593034) [![Actions Status](https://github.com/bridgedb/BridgeDb/workflows/build/badge.svg)](https://github.com/bridgedb/BridgeDb/actions) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.bridgedb/bridgedb-bundle/badge.svg)](https://maven-badges.herokuapp.com/maven-central/org.bridgedb/bridgedb-bundle) From af281bb3d363e14a05069d293372f2a31e2b3a66 Mon Sep 17 00:00:00 2001 From: Youp Hendriks Date: Wed, 28 Feb 2024 17:14:22 +0100 Subject: [PATCH 4/6] 2 tests; valid works, invalid in progress --- .../org/bridgedb/DataSourcePatternsTest.java | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 org.bridgedb/src/test/java/org/bridgedb/DataSourcePatternsTest.java diff --git a/org.bridgedb/src/test/java/org/bridgedb/DataSourcePatternsTest.java b/org.bridgedb/src/test/java/org/bridgedb/DataSourcePatternsTest.java new file mode 100644 index 000000000..dfb515019 --- /dev/null +++ b/org.bridgedb/src/test/java/org/bridgedb/DataSourcePatternsTest.java @@ -0,0 +1,48 @@ +/* + *BridgeDb, + *An abstraction layer for identifier mapping services, both local and online. + *Copyright (c) 2012 Egon Willighagen + *Copyright (c) 2012 OpenPhacts + * + *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.bridgedb; + +import java.util.regex.Pattern; + +import static org.junit.jupiter.api.Assertions.*; +import org.junit.jupiter.api.DisplayName; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Assertions; + +/** + * Tests the {@link org.bridgedb.DataSourcePatterns} class + * @author youphendriks + */ +public class DataSourcePatternsTest { + + protected static DataSource key; + + @Test + @DisplayName("Test getDataSourceMatches class, valid input") + public void testgetDataSourceMatchesValid() { + assertNotNull(DataSourcePatterns.getDataSourceMatches("F")); + } + + @Test + @DisplayName("Test getDataSourceMatches class, invalid input") + public void testgetDataSourceMatchesInvalid() { + Assertions.assertThrows(IllegalArgumentException.class, + () -> { + DataSourcePatterns.getDataSourceMatches(""); + }); + } + +} From 3525f3c7a4e665ffa64bd2ef26db793131723125 Mon Sep 17 00:00:00 2001 From: Youp Hendriks Date: Wed, 28 Feb 2024 17:37:19 +0100 Subject: [PATCH 5/6] Disabled in progress test --- .../src/test/java/org/bridgedb/DataSourcePatternsTest.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/org.bridgedb/src/test/java/org/bridgedb/DataSourcePatternsTest.java b/org.bridgedb/src/test/java/org/bridgedb/DataSourcePatternsTest.java index dfb515019..dcb0c7604 100644 --- a/org.bridgedb/src/test/java/org/bridgedb/DataSourcePatternsTest.java +++ b/org.bridgedb/src/test/java/org/bridgedb/DataSourcePatternsTest.java @@ -20,6 +20,8 @@ import static org.junit.jupiter.api.Assertions.*; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Assertions; /** @@ -36,6 +38,7 @@ public void testgetDataSourceMatchesValid() { assertNotNull(DataSourcePatterns.getDataSourceMatches("F")); } + @Disabled @Test @DisplayName("Test getDataSourceMatches class, invalid input") public void testgetDataSourceMatchesInvalid() { From 5038cd5f1c4c1f6e9cce72fc17385fd34197804d Mon Sep 17 00:00:00 2001 From: Youp Hendriks Date: Fri, 1 Mar 2024 10:11:37 +0100 Subject: [PATCH 6/6] Changed name and added "." to JavaDoc. --- .../java/org/bridgedb/DataSourcePatternsTest.java | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/org.bridgedb/src/test/java/org/bridgedb/DataSourcePatternsTest.java b/org.bridgedb/src/test/java/org/bridgedb/DataSourcePatternsTest.java index dcb0c7604..035af6fc9 100644 --- a/org.bridgedb/src/test/java/org/bridgedb/DataSourcePatternsTest.java +++ b/org.bridgedb/src/test/java/org/bridgedb/DataSourcePatternsTest.java @@ -1,7 +1,7 @@ /* *BridgeDb, *An abstraction layer for identifier mapping services, both local and online. - *Copyright (c) 2012 Egon Willighagen + *Copyright (c) 2012 Youp Hendriks *Copyright (c) 2012 OpenPhacts * *Licensed under the Apache License, Version 2.0 (the "License"); @@ -15,17 +15,15 @@ package org.bridgedb; -import java.util.regex.Pattern; - import static org.junit.jupiter.api.Assertions.*; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Assertions; /** - * Tests the {@link org.bridgedb.DataSourcePatterns} class + * Tests the {@link org.bridgedb.DataSourcePatterns} class. + * * @author youphendriks */ public class DataSourcePatternsTest { @@ -43,9 +41,9 @@ public void testgetDataSourceMatchesValid() { @DisplayName("Test getDataSourceMatches class, invalid input") public void testgetDataSourceMatchesInvalid() { Assertions.assertThrows(IllegalArgumentException.class, - () -> { - DataSourcePatterns.getDataSourceMatches(""); - }); + () -> { + DataSourcePatterns.getDataSourceMatches(""); + }); } }