Skip to content

Commit 62baaef

Browse files
Clean up, bump some dependencies, fixes tests.
1 parent 35a6a57 commit 62baaef

29 files changed

+16
-16
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ build
2323
out
2424
bin
2525
**/bin/
26+
**/target/
2627

2728
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
2829
hs_err_pid*

structurizr-client/build.gradle

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,4 @@ dependencies {
66
api 'org.apache.httpcomponents.client5:httpclient5:5.5.1'
77
api 'javax.xml.bind:jaxb-api:2.4.0-b180830.0359'
88

9-
}
10-
11-
sourceSets {
12-
test {
13-
java {
14-
srcDir 'src/test/java'
15-
srcDir 'src/integrationTest/java'
16-
}
17-
}
189
}

structurizr-client/src/integrationTest/java/com/structurizr/api/BackwardsCompatibilityTests.java renamed to structurizr-client/src/test/java/com/structurizr/api/BackwardsCompatibilityTests.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import com.structurizr.Workspace;
44
import com.structurizr.documentation.Format;
55
import com.structurizr.documentation.Section;
6-
import com.structurizr.model.Location;
76
import com.structurizr.util.WorkspaceUtils;
87
import org.junit.jupiter.api.Test;
98

@@ -13,7 +12,7 @@
1312

1413
class BackwardsCompatibilityTests {
1514

16-
private static final File PATH_TO_WORKSPACE_FILES = new File("./src/integrationTest/resources/backwardsCompatibility");
15+
private static final File PATH_TO_WORKSPACE_FILES = new File("./src/test/resources/backwardsCompatibility");
1716

1817
@Test
1918
void test() throws Exception {

structurizr-client/src/integrationTest/java/com/structurizr/api/WorkspaceApiClientIntegrationTests.java renamed to structurizr-client/src/test/java/com/structurizr/api/WorkspaceApiClientIntegrationTests.java

File renamed without changes.

structurizr-client/src/integrationTest/java/com/structurizr/api/WorkspaceRulesValidationTests.java renamed to structurizr-client/src/test/java/com/structurizr/api/WorkspaceRulesValidationTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
public class WorkspaceRulesValidationTests {
1212

13-
private static final File PATH_TO_WORKSPACE_FILES = new File("./src/integrationTest/resources/workspaceValidation");
13+
private static final File PATH_TO_WORKSPACE_FILES = new File("./src/test/resources/workspaceValidation");
1414

1515
@Test
1616
void exceptionThrown_WhenViewKeysAreNotUnique() throws Exception {

structurizr-client/src/test/java/com/structurizr/view/ThemeUtilsTests.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package com.structurizr.view;
22

33
import com.structurizr.Workspace;
4+
import com.structurizr.http.HttpClient;
45
import com.structurizr.model.Relationship;
56
import com.structurizr.model.SoftwareSystem;
67
import com.structurizr.model.Tags;
@@ -31,7 +32,9 @@ void loadThemes_LoadsThemesWhenThemesAreDefined() throws Exception {
3132
softwareSystem.addTags("Amazon Web Services - Alexa For Business");
3233
workspace.getViews().getConfiguration().setThemes("https://static.structurizr.com/themes/amazon-web-services-2020.04.30/theme.json");
3334

34-
ThemeUtils.loadThemes(workspace);
35+
HttpClient httpClient = new HttpClient();
36+
httpClient.allow(".*");
37+
ThemeUtils.loadThemes(workspace, httpClient);
3538

3639
// there should still be zero styles in the workspace
3740
assertEquals(0, workspace.getViews().getConfiguration().getStyles().getElements().size());
@@ -146,7 +149,9 @@ void loadThemes_ReplacesRelativeIconReferences() throws Exception {
146149
softwareSystem.addTags("Amazon Web Services - Alexa For Business");
147150
workspace.getViews().getConfiguration().setThemes("https://static.structurizr.com/themes/amazon-web-services-2020.04.30/theme.json");
148151

149-
ThemeUtils.loadThemes(workspace);
152+
HttpClient httpClient = new HttpClient();
153+
httpClient.allow(".*");
154+
ThemeUtils.loadThemes(workspace, httpClient);
150155

151156
// there should still be zero styles in the workspace
152157
assertEquals(0, workspace.getViews().getConfiguration().getStyles().getElements().size());

structurizr-client/src/integrationTest/resources/backwardsCompatibility/structurizr-31-workspace.json renamed to structurizr-client/src/test/resources/backwardsCompatibility/structurizr-31-workspace.json

File renamed without changes.

structurizr-client/src/integrationTest/resources/backwardsCompatibility/structurizr-36141-workspace.json renamed to structurizr-client/src/test/resources/backwardsCompatibility/structurizr-36141-workspace.json

File renamed without changes.

structurizr-client/src/integrationTest/resources/backwardsCompatibility/structurizr-39459-workspace.json renamed to structurizr-client/src/test/resources/backwardsCompatibility/structurizr-39459-workspace.json

File renamed without changes.

structurizr-client/src/integrationTest/resources/backwardsCompatibility/views-without-order.json renamed to structurizr-client/src/test/resources/backwardsCompatibility/views-without-order.json

File renamed without changes.

0 commit comments

Comments
 (0)