package core.framework.impl.web.management;

import core.framework.impl.module.PropertyManager;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

import static org.junit.jupiter.api.Assertions.assertEquals;

/**
 * @author neo
 */
class PropertyControllerTest {
    private PropertyController controller;
    private PropertyManager propertyManager;

    @BeforeEach
    void createPropertyController() {
        propertyManager = new PropertyManager();
        controller = new PropertyController(propertyManager, null);
    }

    @Test
    void text() {
        propertyManager.properties.set("sys.jdbc.user", "user");
        propertyManager.properties.set("sys.jdbc.password", "password");

        assertEquals("sys.jdbc.password=(masked)\nsys.jdbc.user=user\n", controller.text());
    }
}

@@ -180,37 +180,36 @@
  static org.
-junit.jupiter
+assertj.core
 .api.Asserti
@@ -218,22 +218,20 @@
 s.assert
-Equals
+That
 ;%0A%0A/**%0A 
@@ -731,84 +731,132 @@
 sert
-Equals(%22sys.jdbc.password=(masked)%5Cnsys.jdbc.user=user%5Cn%22, controller.text()
+That(controller.text())%0A                .contains(%22sys.jdbc.password=******%22)%0A                .contains(%22sys.jdbc.user=user%22
 );%0A 

fix unit test