-
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Sam Gammon <[email protected]>
- Loading branch information
Showing
12 changed files
with
360 additions
and
16 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
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 |
---|---|---|
|
@@ -16,7 +16,6 @@ | |
package elide.http.api | ||
|
||
import elide.annotations.API | ||
import elide.http.MutableHttpHeaders | ||
|
||
/** | ||
* | ||
|
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
54 changes: 54 additions & 0 deletions
54
packages/serverless/src/commonTest/kotlin/elide/http/HttpMessageTest.kt
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,54 @@ | ||
/* | ||
* Copyright (c) 2024 Elide Ventures, LLC. | ||
* | ||
* Licensed under the MIT license (the "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* https://opensource.org/license/mit/ | ||
* | ||
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on | ||
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
* License for the specific language governing permissions and limitations under the License. | ||
*/ | ||
|
||
package elide.http | ||
|
||
import kotlin.test.Test | ||
import kotlin.test.assertFalse | ||
import kotlin.test.assertTrue | ||
import elide.http.api.HttpHeaders | ||
import elide.http.api.HttpMessage | ||
import elide.http.api.HttpMessageType | ||
import elide.http.api.HttpPayload | ||
import elide.http.api.HttpVersion | ||
import elide.http.api.MutableHttpHeaders | ||
import elide.http.api.MutableHttpMessage | ||
import elide.http.api.MutableHttpPayload | ||
|
||
class HttpMessageTest { | ||
@Test fun testImmutableInterface() { | ||
assertFalse(object: HttpMessage { | ||
override val type: HttpMessageType | ||
get() = error("not implemented") | ||
override val version: HttpVersion | ||
get() = error("not implemented") | ||
override val headers: HttpHeaders | ||
get() = error("not implemented") | ||
override val body: HttpPayload | ||
get() = error("not implemented") | ||
}.mutable) | ||
} | ||
|
||
@Test fun testMutableInterface() { | ||
assertTrue(object: MutableHttpMessage { | ||
override val type: HttpMessageType | ||
get() = error("not implemented") | ||
override val version: HttpVersion | ||
get() = error("not implemented") | ||
override val headers: MutableHttpHeaders | ||
get() = error("not implemented") | ||
override val body: MutableHttpPayload | ||
get() = error("not implemented") | ||
}.mutable) | ||
} | ||
} |
Oops, something went wrong.