mirror of
https://github.com/corda/corda.git
synced 2025-06-13 12:48:18 +00:00
Refactoring related to BFT notary demo (#680)
* Fix: Add missing @StartableByRPC to fix the Raft notary demo * Make loadConfig take a Config object, for cordformation Node * Unduplicate User.toMap * Unduplicate WHITESPACE regex, choose possessive form * Use slash to make a Path * Remove Companion where redundant * Remove unused code
This commit is contained in:
@ -18,6 +18,11 @@ data class User(
|
||||
val password: String,
|
||||
val permissions: Set<String>) {
|
||||
override fun toString(): String = "${javaClass.simpleName}($username, permissions=$permissions)"
|
||||
fun toMap() = mapOf(
|
||||
"username" to username,
|
||||
"password" to password,
|
||||
"permissions" to permissions
|
||||
)
|
||||
}
|
||||
|
||||
/** Records the protocol version in which this RPC was added. */
|
||||
|
@ -12,12 +12,10 @@ import org.bouncycastle.asn1.x500.X500Name
|
||||
import org.junit.Test
|
||||
import java.net.URL
|
||||
import java.nio.file.Path
|
||||
import java.nio.file.Paths
|
||||
import java.time.Instant
|
||||
import java.time.LocalDate
|
||||
import java.util.*
|
||||
import kotlin.reflect.full.primaryConstructor
|
||||
import kotlin.test.assertEquals
|
||||
|
||||
class ConfigParsingTest {
|
||||
@Test
|
||||
@ -70,7 +68,7 @@ class ConfigParsingTest {
|
||||
|
||||
@Test
|
||||
fun `Path`() {
|
||||
val path = Paths.get("tmp") / "test"
|
||||
val path = "tmp" / "test"
|
||||
testPropertyType<PathData, PathListData, Path>(path, path / "file", valuesToString = true)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user