-
-
Notifications
You must be signed in to change notification settings - Fork 711
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add OSGi integration testing to build (#1888)
We define a simple test class to verify basic operations. Fixes #1888 Signed-off-by: BJ Hargrave <[email protected]>
- Loading branch information
1 parent
7dec889
commit c9807b9
Showing
3 changed files
with
188 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* | ||
* 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. | ||
* | ||
* Copyright 2012-2020 the original author or authors. | ||
*/ | ||
package org.assertj.core.osgi; | ||
|
||
import static org.assertj.core.api.Assertions.assertThat; | ||
import static org.assertj.core.api.Assertions.assertThatCode; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
class SimpleTest { | ||
|
||
@Test | ||
void simple_success() { | ||
assertThat("A String").isNotNull() | ||
.isNotEmpty() | ||
.contains("A", "String") | ||
.isEqualTo("A String"); | ||
} | ||
|
||
@Test | ||
void simple_failure() { | ||
assertThatCode(() -> assertThat("A String").isNull()).isInstanceOf(AssertionError.class); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,40 @@ | ||
# It's ok if this version range changes. It's probably | ||
# because assertj just changed it's version. A future | ||
# version of bnd will solve this by not writing back | ||
# -runbundles when being used for verification. | ||
-runbundles: assertj-core;version='[3.17.1,3.17.2)' | ||
# 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. | ||
# | ||
# Copyright 2020 the original author or authors. | ||
|
||
-tester: biz.aQute.tester.junit-platform | ||
|
||
-runfw: org.eclipse.osgi | ||
-resolve.effective: active | ||
-runproperties: \ | ||
org.osgi.framework.bootdelegation=sun.reflect,\ | ||
osgi.console= | ||
|
||
-runrequires: \ | ||
bnd.identity;id='${project.artifactId}-tests',\ | ||
bnd.identity;id='junit-jupiter-engine',\ | ||
bnd.identity;id='junit-platform-launcher' | ||
|
||
# This will help us keep -runbundles sorted | ||
-runstartlevel: \ | ||
order=sortbynameversion,\ | ||
begin=-1 | ||
|
||
# The version ranges will change as the version of | ||
# AssertJ and/or its dependencies change. | ||
-runbundles: \ | ||
assertj-core;version='[3.17.2,3.17.3)',\ | ||
assertj-core-tests;version='[3.17.2,3.17.3)',\ | ||
junit-jupiter-api;version='[5.6.2,5.6.3)',\ | ||
junit-jupiter-engine;version='[5.6.2,5.6.3)',\ | ||
junit-platform-commons;version='[1.6.2,1.6.3)',\ | ||
junit-platform-engine;version='[1.6.2,1.6.3)',\ | ||
junit-platform-launcher;version='[1.6.2,1.6.3)',\ | ||
org.opentest4j;version='[1.2.0,1.2.1)' |
c9807b9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @bjhargrave, this commit added the test jar to the
maven-jar-plugin
configuration for the OSGi integration tests, but I assume it's not necessary to deploy it as part of a release, right?c9807b9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test jar is only needed for the osgi-integration-* executions. So no need to deploy it.