• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

hyperledger / identus-cloud-agent / 10793991050

10 Sep 2024 01:56PM UTC coverage: 48.504% (-4.5%) from 52.962%
10793991050

push

web-flow
build: sbt and plugins dependency update (#1337)

Signed-off-by: Hyperledger Bot <hyperledger-bot@hyperledger.org>
Signed-off-by: Yurii Shynbuiev <yurii.shynbuiev@iohk.io>
Co-authored-by: Hyperledger Bot <hyperledger-bot@hyperledger.org>
Co-authored-by: Yurii Shynbuiev <yurii.shynbuiev@iohk.io>

7406 of 15269 relevant lines covered (48.5%)

0.49 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

72.0
/mercury/agent-didcommx/src/main/scala/org/hyperledger/identus/mercury/model/package.scala
1
package org.hyperledger.identus.mercury.model
2

3
import org.didcommx.didcomm.model.*
4

5
import scala.jdk.CollectionConverters.*
6
import scala.language.implicitConversions
7

8
final case class EncryptedMessageImp(private val msg: PackEncryptedResult) extends EncryptedMessage {
9
  def string: String = msg.getPackedMessage
×
10
}
11

12
final case class SignedMessageImp(private val msg: PackSignedResult) extends SignedMesage {
13
  def string: String = msg.getPackedMessage
×
14
}
15

16
final case class UnpackMessageImp(private val msg: UnpackResult) extends UnpackMessage {
17
  def message = UnpackMessageImp.message(msg.getMessage)
×
18
}
19

20
object UnpackMessageImp {
21
  def message(msg: org.didcommx.didcomm.message.Message): Message = {
1✔
22

23
    val thisbody = JsonUtilsForDidCommx.fromJavaMapToJson(msg.getBody)
1✔
24

25
    val attachments: Seq[AttachmentDescriptor] = Option(msg.getAttachments()).toSeq
1✔
26
      .flatMap(_.asScala.toSeq)
1✔
27
      .map(e => e) // using the given Conversion
×
28

29
    Message(
30
      `type` = msg.getType(),
1✔
31
      from = Option(msg.getFrom()).map(DidId(_)),
1✔
32
      to = Option(msg.getTo()).toSeq
1✔
33
        .map(_.asScala)
1✔
34
        .flatMap(_.toSeq.map(e => DidId(e))),
×
35
      body = thisbody,
36
      id = msg.getId(),
1✔
37
      createdTime = { Option(msg.getCreatedTime()): Option[java.lang.Long] }.map(i => i),
1✔
38
      expiresTimePlus = { Option(msg.getExpiresTime()): Option[java.lang.Long] }.map(i => i),
1✔
39
      attachments = Option(attachments).filter(!_.isEmpty),
1✔
40
      thid = Option(msg.getThid()).filter(!_.isEmpty()),
1✔
41
      pthid = Option(msg.getPthid()).filter(!_.isEmpty()),
1✔
42
      ack = Option(msg.getAck()).map(Seq(_)),
×
43
      pleaseAck = Option(msg.getPleaseAck())
1✔
44
        .flatMap {
1✔
45
          // https://identity.foundation/didcomm-messaging/spec/#acks
46
          case java.lang.Boolean.TRUE =>
1✔
47
            Some(Seq.empty) // NOTE lib limitation the field pleaseAck MUST be a Array of string
1✔
48
          case java.lang.Boolean.FALSE => None
×
49
        }
50
    )
51
  }
52
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc