Skip to content

Commit

Permalink
ECS-447: Updated tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MEM2677 committed Dec 19, 2024
1 parent 2ab8340 commit 4211447
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
*/
package org.entando.entando.plugins.jpseo.apsadmin.portal;

import org.entando.entando.apsadmin.user.UserSettingsAction;
import org.entando.entando.ent.exception.EntException;
import com.agiletec.aps.system.services.baseconfig.ConfigInterface;
import com.agiletec.apsadmin.portal.PageSettingsAction;
Expand Down Expand Up @@ -84,6 +85,9 @@ class PageSettingsActionAspectTest {
@InjectMocks
private PageSettingsAction pageSettingsAction;

@InjectMocks
private UserSettingsAction userSettingsAction;

@InjectMocks
private PageSettingsActionAspect actionAspect;

Expand Down Expand Up @@ -207,4 +211,12 @@ public void executeUpdateSystemParams_9() throws EntException {
Assertions.assertTrue(pageSettingsAction.hasActionErrors());
}

@Test
public void executeUpdateSystemWithIncorrectObject() throws EntException {
when(joinPoint.getTarget()).thenReturn(userSettingsAction);
actionAspect.executeUpdateSystemParams(joinPoint);
Assertions.assertFalse(pageSettingsAction.hasFieldErrors());
Assertions.assertFalse(pageSettingsAction.hasActionErrors());
}

}

0 comments on commit 4211447

Please sign in to comment.