Skip to content

Commit

Permalink
Expand DocumentationTest into ModularityTests.
Browse files Browse the repository at this point in the history
  • Loading branch information
odrotbohm committed May 23, 2024
1 parent 4aa419d commit 4e6e94f
Showing 1 changed file with 14 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2022 the original author or authors.
* Copyright 2022-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -15,26 +15,29 @@
*/
package org.springsource.restbucks;

import ch.qos.logback.classic.Level;
import ch.qos.logback.classic.Logger;

import java.io.IOException;

import org.junit.jupiter.api.Test;
import org.springframework.modulith.core.ApplicationModules;
import org.springframework.modulith.docs.Documenter;

/**
* Verifying modulithic structure and creating documentation for {@link ApplicationModules}.
*
* @author Oliver Drotbohm
*/
public class DocumentationTest {
class ModularityTests {

ApplicationModules modules = ApplicationModules.of(Restbucks.class);

@Test
void createModulithsDocumentation() throws IOException {
void verifiesArchitecture() {

((Logger) org.slf4j.LoggerFactory.getLogger(Logger.ROOT_LOGGER_NAME)) //
.setLevel(Level.ERROR);
// System.out.println(modules);

new Documenter(ApplicationModules.of(Restbucks.class).verify()).writeDocumentation();
modules.verify();
}

@Test
void createDocumentation() {
new Documenter(modules).writeDocumentation();
}
}

0 comments on commit 4e6e94f

Please sign in to comment.