Skip to content

Commit

Permalink
fix: clear unrelated commits
Browse files Browse the repository at this point in the history
  • Loading branch information
minliacom committed Dec 16, 2022
1 parent 151cdac commit 864ef5b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import run.halo.app.infra.exception.ThemeUninstallException;
import run.halo.app.infra.properties.HaloProperties;
import run.halo.app.infra.utils.JsonUtils;
import run.halo.app.theme.TemplateEngineManager;
import run.halo.app.theme.ThemePathPolicy;

/**
Expand All @@ -39,13 +38,9 @@ public class ThemeReconciler implements Reconciler<Request> {
private final ExtensionClient client;
private final ThemePathPolicy themePathPolicy;

private final TemplateEngineManager templateEngineManager;

public ThemeReconciler(ExtensionClient client, HaloProperties haloProperties,
TemplateEngineManager templateEngineManager) {
public ThemeReconciler(ExtensionClient client, HaloProperties haloProperties) {
this.client = client;
themePathPolicy = new ThemePathPolicy(haloProperties.getWorkDir());
this.templateEngineManager = templateEngineManager;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
import run.halo.app.extension.controller.Reconciler;
import run.halo.app.infra.properties.HaloProperties;
import run.halo.app.infra.utils.JsonUtils;
import run.halo.app.theme.TemplateEngineManager;
import run.halo.app.theme.ThemePathPolicy;

/**
Expand All @@ -53,8 +52,6 @@ class ThemeReconcilerTest {
private HaloProperties haloProperties;

@Mock
private TemplateEngineManager templateEngineManager;

private File defaultTheme;

private Path tempDirectory;
Expand All @@ -77,7 +74,7 @@ void reconcileDelete() throws IOException {
when(haloProperties.getWorkDir()).thenReturn(testWorkDir);

final ThemeReconciler themeReconciler =
new ThemeReconciler(extensionClient, haloProperties, templateEngineManager);
new ThemeReconciler(extensionClient, haloProperties);
final ThemePathPolicy themePathPolicy = new ThemePathPolicy(testWorkDir);

Theme theme = new Theme();
Expand Down Expand Up @@ -120,7 +117,7 @@ void themeSettingDefaultValue() throws IOException, JSONException {
when(haloProperties.getWorkDir()).thenReturn(testWorkDir);

final ThemeReconciler themeReconciler =
new ThemeReconciler(extensionClient, haloProperties, templateEngineManager);
new ThemeReconciler(extensionClient, haloProperties);

Theme theme = new Theme();
Metadata metadata = new Metadata();
Expand Down Expand Up @@ -181,8 +178,7 @@ void themeSettingDefaultValue() throws IOException, JSONException {
void settingDefinedDefaultValueMap() throws JSONException {
Setting setting = getFakeSetting();
when(haloProperties.getWorkDir()).thenReturn(tempDirectory);
Map<String, String> map = new ThemeReconciler(extensionClient, haloProperties,
templateEngineManager)
Map<String, String> map = new ThemeReconciler(extensionClient, haloProperties)
.settingDefinedDefaultValueMap(setting);
JSONAssert.assertEquals("""
{
Expand Down

0 comments on commit 864ef5b

Please sign in to comment.