BAEL-6716 - Fix test methods naming
This commit is contained in:
parent
4c129ead61
commit
ab43a18bb0
|
@ -14,7 +14,7 @@ public class DecodeUUIDStringFromBase64UnitTest {
|
|||
private final UUID originalUUID = UUID.fromString("cc5f93f7-8cf1-4a51-83c6-e740313a0c6c");
|
||||
|
||||
@Test
|
||||
public void shouldDecodeUUIDUsingByteArrayAndBase64Decoder() {
|
||||
public void givenEncodedString_whenDecodingUsingBase64Decoder_thenGiveExpectedUUID() {
|
||||
String expectedEncodedString = "UUrxjPeTX8xsDDoxQOfGgw";
|
||||
byte[] decodedBytes = Base64.getDecoder()
|
||||
.decode(expectedEncodedString);
|
||||
|
@ -23,7 +23,7 @@ public class DecodeUUIDStringFromBase64UnitTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void shouldDecodeUUIDUsingByteBufferAndBase64UrlDecoder() {
|
||||
public void givenEncodedString_whenDecodingUsingByteBufferAndBase64UrlDecoder_thenGiveExpectedUUID() {
|
||||
String expectedEncodedString = "zF-T94zxSlGDxudAMToMbA";
|
||||
byte[] decodedBytes = Base64.getUrlDecoder()
|
||||
.decode(expectedEncodedString);
|
||||
|
@ -35,7 +35,7 @@ public class DecodeUUIDStringFromBase64UnitTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void shouldDecodeUUIDUsingApacheUtils() {
|
||||
public void givenEncodedString_whenDecodingUsingApacheUtils_thenGiveExpectedUUID() {
|
||||
String expectedEncodedString = "UUrxjPeTX8xsDDoxQOfGgw";
|
||||
byte[] decodedBytes = decodeBase64(expectedEncodedString);
|
||||
UUID uuid = Conversion.byteArrayToUuid(decodedBytes, 0);
|
||||
|
|
|
@ -14,7 +14,7 @@ public class EncodeUUIDToBase64StringUnitTest {
|
|||
private final UUID originalUUID = UUID.fromString("cc5f93f7-8cf1-4a51-83c6-e740313a0c6c");
|
||||
|
||||
@Test
|
||||
public void shouldEncodeUUIDUsingByteArrayAndBase64Encoder() {
|
||||
public void givenUUID_whenEncodingUsingBase64Encoder_thenGiveExpectedEncodedString() {
|
||||
String expectedEncodedString = "UUrxjPeTX8xsDDoxQOfGgw";
|
||||
byte[] uuidBytes = convertToByteArray(originalUUID);
|
||||
String encodedUUID = Base64.getEncoder().withoutPadding()
|
||||
|
@ -23,7 +23,7 @@ public class EncodeUUIDToBase64StringUnitTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void shouldEncodeUUIDUsingByteBufferAndBase64UrlEncoder() {
|
||||
public void givenUUID_whenEncodingUsingByteBufferAndBase64UrlEncoder_thenGiveExpectedEncodedString() {
|
||||
String expectedEncodedString = "zF-T94zxSlGDxudAMToMbA";
|
||||
ByteBuffer byteBuffer = ByteBuffer.wrap(new byte[16]);
|
||||
byteBuffer.putLong(originalUUID.getMostSignificantBits());
|
||||
|
@ -34,7 +34,7 @@ public class EncodeUUIDToBase64StringUnitTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void shouldEncodeUUIDUsingApacheUtils() {
|
||||
public void givenUUID_whenEncodingUsingApacheUtils_thenGiveExpectedEncodedString() {
|
||||
String expectedEncodedString = "UUrxjPeTX8xsDDoxQOfGgw";
|
||||
byte[] bytes = Conversion.uuidToByteArray(originalUUID, new byte[16], 0, 16);
|
||||
String encodedUUID = encodeBase64URLSafeString(bytes);
|
||||
|
|
Loading…
Reference in New Issue