-
Notifications
You must be signed in to change notification settings - Fork 172
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cf10c14
commit 63a6f36
Showing
3 changed files
with
17 additions
and
23 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 |
---|---|---|
|
@@ -12,22 +12,11 @@ | |
import java.util.List; | ||
|
||
import static java.util.stream.Collectors.toList; | ||
import static org.asciidoctor.OptionsBuilder.options; | ||
import static org.hamcrest.Matchers.hasItems; | ||
import static org.hamcrest.Matchers.is; | ||
import static org.hamcrest.Matchers.notNullValue; | ||
import static org.hamcrest.Matchers.startsWith; | ||
import static org.junit.Assert.assertThat; | ||
import static org.hamcrest.MatcherAssert.assertThat; | ||
import static org.hamcrest.Matchers.*; | ||
|
||
public class WhenBackendIsRevealJs { | ||
|
||
private Asciidoctor asciidoctor; | ||
|
||
@Before | ||
public void initAsciidoctor() { | ||
this.asciidoctor = Asciidoctor.Factory.create(); | ||
} | ||
|
||
@Test | ||
public void should_create_simple_slides() throws IOException { | ||
String filename = "sample"; | ||
|
@@ -38,7 +27,7 @@ public void should_create_simple_slides() throws IOException { | |
AsciidoctorInvoker.main(new String[]{ | ||
"-b", "revealjs", | ||
"-r", "asciidoctor-diagram", | ||
"-a", "revealjsdir=https://cdn.jsdelivr.net/npm/reveal.js@3.9.2", | ||
"-a", "revealjsdir=https://cdn.jsdelivr.net/npm/reveal.js@4.1.2", | ||
inputFile.getAbsolutePath() | ||
}); | ||
|
||
|
@@ -51,9 +40,8 @@ public void should_create_simple_slides() throws IOException { | |
.map(element -> element.attr("href")) | ||
.collect(toList()); | ||
assertThat(stylesheets, | ||
hasItems( | ||
"https://cdn.jsdelivr.net/npm/[email protected]/css/reveal.css", | ||
"https://cdn.jsdelivr.net/npm/[email protected]/css/theme/black.css")); | ||
hasItems("https://cdn.jsdelivr.net/npm/[email protected]/dist/reveal.css", | ||
"https://cdn.jsdelivr.net/npm/[email protected]/dist/theme/black.css")); | ||
|
||
Element diagramSlide = doc.selectFirst("#diagram"); | ||
assertThat(diagramSlide, notNullValue()); | ||
|
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