Skip to content

Commit

Permalink
Add unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
nntthuy-axonivy committed Dec 13, 2024
1 parent aabb352 commit 37c538f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,16 @@ void testGetExtractedPartsOfEmptyReadme() {
assertTrue(StringUtils.isBlank(readmeContentsModel.getSetup()));
}

@Test
void testGetExtractedPartsOfReadmeAtCorrectHeadings() {
String readmeContents = getMockReadmeContent();
ReadmeContentsModel readmeContentsModel = ProductContentUtils.getExtractedPartsOfReadme(readmeContents);
assertTrue(readmeContentsModel.getDescription().startsWith("Axon Ivy’s mattermost connector"));
assertTrue(readmeContentsModel.getDemo().startsWith("### Demo sample"));
assertTrue(readmeContentsModel.getSetup().startsWith("### Setup guideline"));

}

@Test
void testHasImageDirectives() {
String readmeContents = getMockReadmeContent();
Expand Down
2 changes: 2 additions & 0 deletions marketplace-service/src/test/resources/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ This connector:

## Demo

### Demo sample
1. Hit the slash command key on the channel's chat.
The Axon Ivy process will be triggered and create a new task.
The task's information will be sent to the channel by a message.
Expand All @@ -20,6 +21,7 @@ This connector:

## Setup

### Setup guideline
Mattermost Instance

1. Ref to [Deploy Mattermost](https://docs.mattermost.com/guides/deployment.html).
Expand Down

0 comments on commit 37c538f

Please sign in to comment.