-
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.
- Loading branch information
1 parent
5575167
commit 2e1a06f
Showing
13 changed files
with
94 additions
and
29 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
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,20 @@ | ||
package io.polywrap.plugins.logger | ||
|
||
import io.polywrap.configBuilder.polywrapClient | ||
import io.polywrap.core.InvokeResult | ||
import io.polywrap.core.resolution.Uri | ||
import io.polywrap.plugins.logger.loggerPlugin | ||
import io.polywrap.plugins.logger.wrap.ArgsLog | ||
import io.polywrap.plugins.logger.wrap.LogLevel | ||
import kotlinx.serialization.Serializable | ||
import kotlin.test.Test | ||
import kotlin.test.assertNull | ||
import kotlin.test.assertTrue | ||
|
||
class HelloWorld { | ||
|
||
val aggregatorWrapUri = "wrap://http/https://wraps.wrapscan.io/r/polywrap/[email protected]" | ||
val interfaceUri = "wrapscan.io/polywrap/[email protected]" | ||
|
||
val client = polywrapClient { | ||
addDefaults() | ||
setPackage("plugin/logger" to loggerPlugin(null)) | ||
|
@@ -31,4 +35,21 @@ class HelloWorld { | |
assertNull(result.exceptionOrNull()) | ||
assertTrue(result.getOrThrow()) | ||
} | ||
|
||
@Test | ||
fun printHelloWorldThroughAggregatorWrap() { | ||
@Serializable | ||
class ArgsInfo(val message: String) | ||
|
||
println("Invoking Method: info") | ||
|
||
val result: InvokeResult<Boolean> = client.invoke( | ||
uri = Uri(aggregatorWrapUri), | ||
method = "info", | ||
args = ArgsInfo("Hello, World!") | ||
) | ||
|
||
assertNull(result.exceptionOrNull()) | ||
assertTrue(result.getOrThrow()) | ||
} | ||
} |
File renamed without changes.
File renamed without changes.