-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reflecting the case-insensitivity of http headers (#275)
reflecting the case-insensitivity of http headers
- Loading branch information
1 parent
d23ec13
commit c27e201
Showing
7 changed files
with
55 additions
and
24 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
24 changes: 24 additions & 0 deletions
24
message/message-http/src/test/java/com/mastercard/test/flow/msg/http/HttpMsgTest.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,24 @@ | ||
package com.mastercard.test.flow.msg.http; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
/** | ||
* Exercises generic functionality of the {@link HttpMsg} superclass | ||
*/ | ||
@SuppressWarnings("static-method") | ||
class HttpMsgTest { | ||
|
||
/** | ||
* Illustrates the lower-casing behaviour of {@link HttpMsg#header(String)} | ||
*/ | ||
@Test | ||
void header() { | ||
assertEquals( "^mixed-case^", HttpMsg.header( "MiXeD-cAsE" ), | ||
"name is lower-cased and sigils are added" ); | ||
|
||
assertEquals( "mixed-case", HttpMsg.unheader( HttpMsg.header( "MiXeD-cAsE" ) ), | ||
"unheader cannot restore the input casing" ); | ||
} | ||
} |
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