-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
eschleb
committed
Sep 23, 2024
1 parent
01e1e91
commit a4f711e
Showing
10 changed files
with
94 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>com.namics.oss.magnolia</groupId> | ||
<artifactId>magnolia-definition-builders-parent</artifactId> | ||
<version>1.2.2-SNAPSHOT</version> | ||
</parent> | ||
|
||
<artifactId>custom-definition-builders-spring</artifactId> | ||
|
||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>com.namics.oss.magnolia</groupId> | ||
<artifactId>custom-definition-builders</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework</groupId> | ||
<artifactId>spring-context</artifactId> | ||
<version>${spring.version}</version> | ||
</dependency> | ||
</dependencies> | ||
</project> |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
...oss/magnolia/definition/custom/linkset/model/util/ExtendedLinkQueryParamModifierTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
package com.merkle.oss.magnolia.definition.custom.linkset.model.util; | ||
|
||
import static org.junit.jupiter.api.Assertions.*; | ||
|
||
import java.util.Map; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
import com.merkle.oss.magnolia.definition.custom.linkset.LinkTypes; | ||
import com.merkle.oss.magnolia.definition.custom.linkset.model.Link; | ||
import com.merkle.oss.magnolia.definition.custom.linkset.model.LinkModel; | ||
|
||
class ExtendedLinkQueryParamModifierTest { | ||
private static final Link LINK = new LinkModel( | ||
"linkText", | ||
"/de/test?param1=42", | ||
"https://someDomain.com/de/test?param1=42", | ||
false, | ||
false, | ||
LinkTypes.INTERNAL | ||
); | ||
|
||
@Test | ||
void withAppend() { | ||
assertEquals( | ||
new LinkModel( | ||
"linkText", | ||
"/de/test?param1=42¶m2=43", | ||
"https://someDomain.com/de/test?param1=42¶m2=43", | ||
false, | ||
false, | ||
LinkTypes.INTERNAL | ||
), | ||
new ExtendedLinkQueryParamModifier().withAppend(LINK, Map.of("param2", "43")) | ||
); | ||
} | ||
|
||
@Test | ||
void withReplace() { | ||
assertEquals( | ||
new LinkModel( | ||
"linkText", | ||
"/de/test?param2=43", | ||
"https://someDomain.com/de/test?param2=43", | ||
false, | ||
false, | ||
LinkTypes.INTERNAL | ||
), | ||
new ExtendedLinkQueryParamModifier().withReplace(LINK, Map.of("param2", "43")) | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters