Skip to content

Commit c5bf983

Browse files
committed
refactor test
1 parent d152174 commit c5bf983

File tree

1 file changed

+1
-65
lines changed
  • archunit/src/test/java/com/tngtech/archunit/library/adr/markdown

1 file changed

+1
-65
lines changed

archunit/src/test/java/com/tngtech/archunit/library/adr/markdown/MdAdrTest.java

Lines changed: 1 addition & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -10,71 +10,7 @@ void testMdGeneration() {
1010
MatcherAssert.assertThat(
1111
new ExampleAdr().toString(),
1212
new IsEqual<>(
13-
"---\n" +
14-
"status: accepted\n" +
15-
"date: YYYY-MM-DD\n" +
16-
"decision-makers: John Doe, Romain Rochegude\n" +
17-
"consulted: John Doe, Romain Rochegude\n" +
18-
"informed: John Doe, Romain Rochegude\n" +
19-
"---\n" +
20-
"\n" +
21-
"# {short title, representative of solved problem and found solution}\n" +
22-
"\n" +
23-
"## Context and Problem Statement\n" +
24-
"\n" +
25-
"{Describe the context and problem statement, e.g., in free form using two to three sentences or in the form of an illustrative story. You may want to articulate the problem in form of a question and add links to collaboration boards or issue management systems.}\n" +
26-
"\n" +
27-
"## Decision Drivers\n" +
28-
"\n" +
29-
"* {decision driver 1, e.g., a force, facing concern, ...}\n" +
30-
"* {decision driver 2, e.g., a force, facing concern, ...}\n" +
31-
"\n" +
32-
"## Considered Options\n" +
33-
"\n" +
34-
"* {title of option 1}\n" +
35-
"* {title of option 2}\n" +
36-
"* {title of option 3}\n" +
37-
"\n" +
38-
"## Decision Outcome\n" +
39-
"\n" +
40-
"Chosen option: \"{title of option 1}\", because {justification. e.g., only option, which meets k.o. criterion decision driver | which resolves force {force} | ... | comes out best (see below)}.\n" +
41-
"\n" +
42-
"### Consequences\n" +
43-
"\n" +
44-
"* Good, because {positive consequence, e.g., improvement of one or more desired qualities, ...}\n" +
45-
"* Bad, because {negative consequence, e.g., compromising one or more desired qualities, ...}\n" +
46-
"\n" +
47-
"### Confirmation\n" +
48-
"\n" +
49-
"{Describe how the implementation / compliance of the ADR can/will be confirmed. Is there any automated or manual fitness function? If so, list it and explain how it is applied. Is the chosen design and its implementation in line with the decision? E.g., a design/code review or a test with a library such as ArchUnit can help validate this. Note that although we classify this element as optional, it is included in many ADRs.}\n" +
50-
"\n" +
51-
"## Pros and Cons of the Options\n" +
52-
"\n" +
53-
"### {title of option 1}\n" +
54-
"\n" +
55-
"{description}\n" +
56-
"\n" +
57-
"{example}\n" +
58-
"\n" +
59-
"* Good, because {argument a}\n" +
60-
"* Good, because {argument b}\n" +
61-
"* Neutral, because {argument c}\n" +
62-
"* Bad, because {argument d}\n" +
63-
"\n" +
64-
"### {title of other option}\n" +
65-
"\n" +
66-
"{description}\n" +
67-
"\n" +
68-
"{example}\n" +
69-
"\n" +
70-
"* Good, because {argument a}\n" +
71-
"* Good, because {argument b}\n" +
72-
"* Neutral, because {argument c}\n" +
73-
"* Bad, because {argument d}\n" +
74-
"\n" +
75-
"## More Information\n" +
76-
"\n" +
77-
"{You might want to provide additional evidence/confidence for the decision outcome here and/or document the team agreement on the decision and/or define when/how this decision the decision should be realized and if/when it should be re-visited. Links to other decisions and resources might appear here as well.}"
13+
new ExpectedExampleAdr().toString()
7814
)
7915
);
8016
}

0 commit comments

Comments
 (0)