-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support multiple master keys in one build
- Loading branch information
Showing
7 changed files
with
130 additions
and
48 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
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
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
38 changes: 38 additions & 0 deletions
38
src/test/java/biz/netcentric/aem/crypto/CryptoSupportInterpolatorCustomizerTest.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,38 @@ | ||
package biz.netcentric.aem.crypto; | ||
|
||
import java.util.AbstractMap; | ||
import java.util.Optional; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
|
||
/*- | ||
* #%L | ||
* aem-crypto-support | ||
* %% | ||
* Copyright (C) 2024 Cognizant Netcentric | ||
* %% | ||
* This program and the accompanying materials are made | ||
* available under the terms of the Eclipse Public License 2.0 | ||
* which is available at https://www.eclipse.org/legal/epl-2.0/ | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
* #L% | ||
*/ | ||
|
||
class CryptoSupportInterpolatorCustomizerTest { | ||
|
||
@Test | ||
void testExtractKeyIdAndSuffix() { | ||
assertEquals(Optional.empty(), CryptoSupportInterpolatorCustomizer.extractKeyIdAndSuffix("other.key")); | ||
assertEquals( | ||
Optional.of(new AbstractMap.SimpleEntry<String, String>("default", "test")), | ||
CryptoSupportInterpolatorCustomizer.extractKeyIdAndSuffix("vltaemencrypt.test")); | ||
assertEquals( | ||
Optional.of(new AbstractMap.SimpleEntry<String, String>("id1", "test")), | ||
CryptoSupportInterpolatorCustomizer.extractKeyIdAndSuffix("vltaemencryptid1.test")); | ||
assertEquals(Optional.empty(), CryptoSupportInterpolatorCustomizer.extractKeyIdAndSuffix("vltaemencryptid1.")); | ||
assertEquals(Optional.empty(), CryptoSupportInterpolatorCustomizer.extractKeyIdAndSuffix("vltaemencrypt.")); | ||
} | ||
} |