From 86d66673d8b0f165ad75a0d655ab6e4dbea2e69c Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 5 Apr 2026 16:12:54 +0000 Subject: [PATCH] style: rename test methods from snake_case to camelCase https://claude.ai/code/session_01AfRYTRCvtKqqDxeKQujUrx --- .../amethyst/commons/call/CallManagerTest.kt | 100 +++++++++--------- .../commons/call/PeerSessionManagerTest.kt | 48 ++++----- .../NipACGiftWrapRoundTripTest.kt | 40 +++---- 3 files changed, 94 insertions(+), 94 deletions(-) diff --git a/commons/src/commonTest/kotlin/com/vitorpamplona/amethyst/commons/call/CallManagerTest.kt b/commons/src/commonTest/kotlin/com/vitorpamplona/amethyst/commons/call/CallManagerTest.kt index ad5757ca8..ed8c4fb8b 100644 --- a/commons/src/commonTest/kotlin/com/vitorpamplona/amethyst/commons/call/CallManagerTest.kt +++ b/commons/src/commonTest/kotlin/com/vitorpamplona/amethyst/commons/call/CallManagerTest.kt @@ -200,7 +200,7 @@ class CallManagerTest { // ======================================================================== @Test - fun incomingCallFromFollowedUser_transitionsToIncomingCall() = + fun incomingCallFromFollowedUserTransitionsToIncomingCall() = runTest { val (manager, _) = createManager(localPubKey = bob) @@ -216,7 +216,7 @@ class CallManagerTest { } @Test - fun incomingCallFromNonFollowed_isIgnored() = + fun incomingCallFromNonFollowedIsIgnored() = runTest { val (manager, _) = createManager(localPubKey = bob, followedKeys = emptySet()) @@ -227,7 +227,7 @@ class CallManagerTest { } @Test - fun acceptingCall_transitionsToConnecting() = + fun acceptingCallTransitionsToConnecting() = runTest { val (manager, _) = createManager(localPubKey = bob) @@ -243,7 +243,7 @@ class CallManagerTest { } @Test - fun peerConnected_transitionsConnectingToConnected() = + fun peerConnectedTransitionsConnectingToConnected() = runTest { val (manager, _) = createManager(localPubKey = bob) @@ -259,7 +259,7 @@ class CallManagerTest { } @Test - fun peerHangup_endsConnectedCall() = + fun peerHangupEndsConnectedCall() = runTest { val (manager, _) = createManager(localPubKey = bob) @@ -277,7 +277,7 @@ class CallManagerTest { } @Test - fun endedState_autoResetsToIdle() = + fun endedStateAutoResetsToIdle() = runTest { val (manager, _) = createManager(localPubKey = bob) @@ -299,7 +299,7 @@ class CallManagerTest { // ======================================================================== @Test - fun initiateCall_transitionsToOffering() = + fun initiateCallTransitionsToOffering() = runTest { val (manager, _) = createManager(localPubKey = alice) @@ -313,7 +313,7 @@ class CallManagerTest { } @Test - fun receivingAnswer_transitionsOfferingToConnecting() = + fun receivingAnswerTransitionsOfferingToConnecting() = runTest { val (manager, _) = createManager(localPubKey = alice, followedKeys = setOf(bob)) @@ -336,7 +336,7 @@ class CallManagerTest { // ======================================================================== @Test - fun rejectingIncomingCall_transitionsToEnded() = + fun rejectingIncomingCallTransitionsToEnded() = runTest { val (manager, _) = createManager(localPubKey = bob) @@ -351,7 +351,7 @@ class CallManagerTest { } @Test - fun receivingReject_endsOfferingCall() = + fun receivingRejectEndsOfferingCall() = runTest { val (manager, _) = createManager(localPubKey = alice, followedKeys = setOf(bob)) @@ -371,7 +371,7 @@ class CallManagerTest { // ======================================================================== @Test - fun incomingCallWhileInActiveCall_autoRejectsBusy() = + fun incomingCallWhileInActiveCallAutoRejectsBusy() = runTest { val (manager, published) = createManager(localPubKey = bob) @@ -399,7 +399,7 @@ class CallManagerTest { // ======================================================================== @Test - fun staleEvents_areDiscarded() = + fun staleEventsAreDiscarded() = runTest { val (manager, _) = createManager(localPubKey = bob) @@ -411,7 +411,7 @@ class CallManagerTest { } @Test - fun freshEvents_areProcessed() = + fun freshEventsAreProcessed() = runTest { val (manager, _) = createManager(localPubKey = bob) @@ -427,7 +427,7 @@ class CallManagerTest { // ======================================================================== @Test - fun duplicateEvents_areIgnored() = + fun duplicateEventsAreIgnored() = runTest { val (manager, _) = createManager(localPubKey = bob) @@ -451,7 +451,7 @@ class CallManagerTest { // ======================================================================== @Test - fun selfIceCandidates_areAlwaysIgnored() = + fun selfIceCandidatesAreAlwaysIgnored() = runTest { val (manager, _) = createManager(localPubKey = bob) @@ -469,7 +469,7 @@ class CallManagerTest { } @Test - fun selfHangup_isAlwaysIgnored() = + fun selfHangupIsAlwaysIgnored() = runTest { val (manager, _) = createManager(localPubKey = bob) @@ -487,7 +487,7 @@ class CallManagerTest { } @Test - fun selfAnswer_inIncomingCall_meansAnsweredElsewhere() = + fun selfAnswerInIncomingCallMeansAnsweredElsewhere() = runTest { val (manager, _) = createManager(localPubKey = bob) @@ -504,7 +504,7 @@ class CallManagerTest { } @Test - fun selfAnswer_inOfferingState_isIgnored() = + fun selfAnswerInOfferingStateIsIgnored() = runTest { val (manager, _) = createManager(localPubKey = alice, followedKeys = setOf(bob)) @@ -523,7 +523,7 @@ class CallManagerTest { // ======================================================================== @Test - fun iceCandidates_areForwardedViaCallback() = + fun iceCandidatesAreForwardedViaCallback() = runTest { val (manager, _) = createManager(localPubKey = bob) @@ -544,7 +544,7 @@ class CallManagerTest { // ======================================================================== @Test - fun renegotiation_inConnectedState_isForwarded() = + fun renegotiationInConnectedStateIsForwarded() = runTest { val (manager, _) = createManager(localPubKey = bob) @@ -563,7 +563,7 @@ class CallManagerTest { } @Test - fun renegotiation_inConnectingState_isForwarded() = + fun renegotiationInConnectingStateIsForwarded() = runTest { val (manager, _) = createManager(localPubKey = bob) @@ -581,7 +581,7 @@ class CallManagerTest { } @Test - fun renegotiation_inIdleState_isIgnored() = + fun renegotiationInIdleStateIsIgnored() = runTest { val (manager, _) = createManager(localPubKey = bob) @@ -596,7 +596,7 @@ class CallManagerTest { } @Test - fun renegotiation_wrongCallId_isIgnored() = + fun renegotiationWrongCallIdIsIgnored() = runTest { val (manager, _) = createManager(localPubKey = bob) @@ -618,7 +618,7 @@ class CallManagerTest { // ======================================================================== @Test - fun hangup_fromOffering_transitionsToEnded() = + fun hangupFromOfferingTransitionsToEnded() = runTest { val (manager, _) = createManager(localPubKey = alice, followedKeys = setOf(bob)) @@ -633,7 +633,7 @@ class CallManagerTest { } @Test - fun hangup_fromConnecting_transitionsToEnded() = + fun hangupFromConnectingTransitionsToEnded() = runTest { val (manager, _) = createManager(localPubKey = bob) @@ -647,7 +647,7 @@ class CallManagerTest { } @Test - fun hangup_fromConnected_transitionsToEnded() = + fun hangupFromConnectedTransitionsToEnded() = runTest { val (manager, _) = createManager(localPubKey = bob) @@ -663,7 +663,7 @@ class CallManagerTest { } @Test - fun hangup_fromIdle_isNoop() = + fun hangupFromIdleIsNoop() = runTest { val (manager, published) = createManager(localPubKey = bob) @@ -678,7 +678,7 @@ class CallManagerTest { // ======================================================================== @Test - fun groupCallOffer_detectsMultipleMembers() = + fun groupCallOfferDetectsMultipleMembers() = runTest { val (manager, _) = createManager(localPubKey = bob) @@ -691,7 +691,7 @@ class CallManagerTest { } @Test - fun groupCall_peerReject_removesFromGroup() = + fun groupCallPeerRejectRemovesFromGroup() = runTest { val (manager, _) = createManager(localPubKey = alice, followedKeys = setOf(bob, carol)) @@ -709,7 +709,7 @@ class CallManagerTest { } @Test - fun groupCall_allPeersReject_endsCall() = + fun groupCallAllPeersRejectEndsCall() = runTest { val (manager, _) = createManager(localPubKey = alice, followedKeys = setOf(bob, carol)) @@ -722,7 +722,7 @@ class CallManagerTest { } @Test - fun groupCall_partialDisconnect_continuesWithRemainingPeers() = + fun groupCallPartialDisconnectContinuesWithRemainingPeers() = runTest { val (manager, _) = createManager(localPubKey = alice, followedKeys = setOf(bob, carol)) @@ -750,7 +750,7 @@ class CallManagerTest { } @Test - fun groupCall_lastPeerLeaves_endsCall() = + fun groupCallLastPeerLeavesEndsCall() = runTest { val (manager, _) = createManager(localPubKey = alice, followedKeys = setOf(bob, carol)) @@ -775,7 +775,7 @@ class CallManagerTest { // ======================================================================== @Test - fun groupCall_discoversPeerWhileRinging() = + fun groupCallDiscoversPeerWhileRinging() = runTest { val (manager, _) = createManager(localPubKey = bob) @@ -807,7 +807,7 @@ class CallManagerTest { // ======================================================================== @Test - fun midCallOffer_sameCallId_isForwardedAsMidCallOffer() = + fun midCallOfferSameCallIdIsForwardedAsMidCallOffer() = runTest { val (manager, _) = createManager(localPubKey = bob, followedKeys = setOf(alice, carol)) @@ -836,7 +836,7 @@ class CallManagerTest { // ======================================================================== @Test - fun answer_wrongCallId_isIgnored() = + fun answerWrongCallIdIsIgnored() = runTest { val (manager, _) = createManager(localPubKey = alice, followedKeys = setOf(bob)) @@ -850,7 +850,7 @@ class CallManagerTest { } @Test - fun hangup_wrongCallId_isIgnored() = + fun hangupWrongCallIdIsIgnored() = runTest { val (manager, _) = createManager(localPubKey = bob) @@ -870,7 +870,7 @@ class CallManagerTest { // ======================================================================== @Test - fun peerLeft_callback_firesOnHangup() = + fun peerLeftCallbackFiresOnHangup() = runTest { val (manager, _) = createManager(localPubKey = alice, followedKeys = setOf(bob, carol)) @@ -892,7 +892,7 @@ class CallManagerTest { // ======================================================================== @Test - fun reset_returnsToIdle() = + fun resetReturnsToIdle() = runTest { val (manager, _) = createManager(localPubKey = bob) @@ -909,7 +909,7 @@ class CallManagerTest { // ======================================================================== @Test - fun videoCallType_preservedThroughStates() = + fun videoCallTypePreservedThroughStates() = runTest { val (manager, _) = createManager(localPubKey = bob) @@ -936,7 +936,7 @@ class CallManagerTest { // ======================================================================== @Test - fun callerHangup_whileRinging_endsIncomingCall() = + fun callerHangupWhileRingingEndsIncomingCall() = runTest { val (manager, _) = createManager(localPubKey = bob) @@ -957,7 +957,7 @@ class CallManagerTest { // the full pipeline: CallManager → WebRtcCallFactory → sign → gift wrap → publish @Test - fun interface_initiateCall_publishesGiftWrappedOffer() = + fun interfaceInitiateCallPublishesGiftWrappedOffer() = runTest { val (manager, published) = createManager(localPubKey = alice, followedKeys = setOf(bob)) @@ -969,7 +969,7 @@ class CallManagerTest { } @Test - fun interface_acceptCall_publishesGiftWrappedAnswer() = + fun interfaceAcceptCallPublishesGiftWrappedAnswer() = runTest { val (manager, published) = createManager(localPubKey = bob, followedKeys = setOf(alice)) @@ -990,7 +990,7 @@ class CallManagerTest { } @Test - fun interface_rejectCall_publishesGiftWrappedReject() = + fun interfaceRejectCallPublishesGiftWrappedReject() = runTest { val (manager, published) = createManager(localPubKey = bob, followedKeys = setOf(alice)) @@ -1006,7 +1006,7 @@ class CallManagerTest { } @Test - fun interface_hangup_publishesGiftWrappedHangup() = + fun interfaceHangupPublishesGiftWrappedHangup() = runTest { val (manager, published) = createManager(localPubKey = bob, followedKeys = setOf(alice)) @@ -1024,7 +1024,7 @@ class CallManagerTest { } @Test - fun interface_sendRenegotiation_publishesGiftWrappedRenegotiate() = + fun interfaceSendRenegotiationPublishesGiftWrappedRenegotiate() = runTest { val (manager, published) = createManager(localPubKey = bob, followedKeys = setOf(alice)) @@ -1043,7 +1043,7 @@ class CallManagerTest { } @Test - fun interface_sendRenegotiationAnswer_publishesGiftWrappedAnswer() = + fun interfaceSendRenegotiationAnswerPublishesGiftWrappedAnswer() = runTest { val (manager, published) = createManager(localPubKey = bob, followedKeys = setOf(alice)) @@ -1060,7 +1060,7 @@ class CallManagerTest { } @Test - fun interface_busyAutoReject_publishesRejectEvent() = + fun interfaceBusyAutoRejectPublishesRejectEvent() = runTest { val (manager, published) = createManager(localPubKey = bob, followedKeys = setOf(alice, carol)) @@ -1083,7 +1083,7 @@ class CallManagerTest { } @Test - fun interface_groupCall_publishesPerPeerOffers() = + fun interfaceGroupCallPublishesPerPeerOffers() = runTest { val (manager, published) = createManager(localPubKey = alice, followedKeys = setOf(bob, carol)) @@ -1097,7 +1097,7 @@ class CallManagerTest { } @Test - fun interface_invitePeer_publishesOfferToNewPeer() = + fun interfaceInvitePeerPublishesOfferToNewPeer() = runTest { val (manager, published) = createManager(localPubKey = alice, followedKeys = setOf(bob)) @@ -1118,7 +1118,7 @@ class CallManagerTest { } @Test - fun interface_fullP2PCallFlow_withRealSigners() = + fun interfaceFullP2PCallFlowWithRealSigners() = runTest { // Full end-to-end P2P call: Alice calls Bob val (aliceManager, alicePublished) = createManager(localPubKey = alice, followedKeys = setOf(bob)) diff --git a/commons/src/commonTest/kotlin/com/vitorpamplona/amethyst/commons/call/PeerSessionManagerTest.kt b/commons/src/commonTest/kotlin/com/vitorpamplona/amethyst/commons/call/PeerSessionManagerTest.kt index d07feb608..0a42593bc 100644 --- a/commons/src/commonTest/kotlin/com/vitorpamplona/amethyst/commons/call/PeerSessionManagerTest.kt +++ b/commons/src/commonTest/kotlin/com/vitorpamplona/amethyst/commons/call/PeerSessionManagerTest.kt @@ -47,7 +47,7 @@ class PeerSessionManagerTest { // ======================================================================== @Test - fun iceCandidate_noSession_bufferedGlobally() { + fun iceCandidateNoSessionBufferedGlobally() { val manager = PeerSessionManager(localPubKey = bob) val candidate = makeCandidate("early-candidate") @@ -58,7 +58,7 @@ class PeerSessionManagerTest { } @Test - fun multipleGlobalCandidates_bufferedForSamePeer() { + fun multipleGlobalCandidatesBufferedForSamePeer() { val manager = PeerSessionManager(localPubKey = bob) manager.routeIceCandidate(alice, makeCandidate("c1")) @@ -69,7 +69,7 @@ class PeerSessionManagerTest { } @Test - fun globalBuffer_drainedOnSessionCreation() { + fun globalBufferDrainedOnSessionCreation() { val manager = PeerSessionManager(localPubKey = bob) val fake = FakePeerSession() @@ -88,7 +88,7 @@ class PeerSessionManagerTest { } @Test - fun globalBuffer_drainedAndFlushedAfterRemoteDescription() { + fun globalBufferDrainedAndFlushedAfterRemoteDescription() { val manager = PeerSessionManager(localPubKey = bob) val fake = FakePeerSession() @@ -115,7 +115,7 @@ class PeerSessionManagerTest { // ======================================================================== @Test - fun iceCandidate_sessionExists_remoteDescNotSet_bufferedPerSession() { + fun iceCandidateSessionExistsRemoteDescNotSetBufferedPerSession() { val manager = PeerSessionManager(localPubKey = bob) val fake = FakePeerSession() manager.registerSession(alice, fake) @@ -128,7 +128,7 @@ class PeerSessionManagerTest { } @Test - fun iceCandidate_sessionExists_remoteDescSet_addedDirectly() { + fun iceCandidateSessionExistsRemoteDescSetAddedDirectly() { val manager = PeerSessionManager(localPubKey = bob) val fake = FakePeerSession() manager.registerSession(alice, fake) @@ -142,7 +142,7 @@ class PeerSessionManagerTest { } @Test - fun perSessionBuffer_notClearedOnSessionCreation_onlyOnFlush() { + fun perSessionBufferNotClearedOnSessionCreationOnlyOnFlush() { val manager = PeerSessionManager(localPubKey = bob) val fake = FakePeerSession() @@ -171,7 +171,7 @@ class PeerSessionManagerTest { // ======================================================================== @Test - fun candidatesBufferedWhileRinging_notLost_whenAccepting() { + fun candidatesBufferedWhileRingingNotLostWhenAccepting() { val manager = PeerSessionManager(localPubKey = bob) val fake = FakePeerSession() @@ -198,7 +198,7 @@ class PeerSessionManagerTest { // ======================================================================== @Test - fun globalBuffers_areSeparatePerPeer() { + fun globalBuffersAreSeparatePerPeer() { val manager = PeerSessionManager(localPubKey = bob) manager.routeIceCandidate(alice, makeCandidate("alice-c")) @@ -209,7 +209,7 @@ class PeerSessionManagerTest { } @Test - fun registeringOneSession_doesNotDrainOtherPeersGlobalBuffer() { + fun registeringOneSessionDoesNotDrainOtherPeersGlobalBuffer() { val manager = PeerSessionManager(localPubKey = bob) manager.routeIceCandidate(alice, makeCandidate("alice-c")) @@ -226,7 +226,7 @@ class PeerSessionManagerTest { // ======================================================================== @Test - fun renegotiation_noGlare_acceptsRemoteOffer() { + fun renegotiationNoGlareAcceptsRemoteOffer() { val manager = PeerSessionManager(localPubKey = bob) val fake = FakePeerSession(signalingState = SignalingState.STABLE) manager.registerSession(alice, fake) @@ -242,7 +242,7 @@ class PeerSessionManagerTest { } @Test - fun renegotiationGlare_localWins_higherPubkey() { + fun renegotiationGlareLocalWinsHigherPubkey() { // carol (higher) is local, alice (lower) is remote → carol wins val manager = PeerSessionManager(localPubKey = carol) val fake = FakePeerSession(signalingState = SignalingState.HAVE_LOCAL_OFFER) @@ -257,7 +257,7 @@ class PeerSessionManagerTest { } @Test - fun renegotiationGlare_remoteWins_rollback() { + fun renegotiationGlareRemoteWinsRollback() { // alice (lower) is local, carol (higher) is remote → carol wins, alice rolls back val manager = PeerSessionManager(localPubKey = alice) val fake = FakePeerSession(signalingState = SignalingState.HAVE_LOCAL_OFFER) @@ -273,7 +273,7 @@ class PeerSessionManagerTest { } @Test - fun renegotiationGlare_noSession_returnsNoSession() { + fun renegotiationGlareNoSessionReturnsNoSession() { val manager = PeerSessionManager(localPubKey = bob) val resolution = @@ -287,7 +287,7 @@ class PeerSessionManagerTest { // ======================================================================== @Test - fun meshInitiation_lowerPubkey_shouldInitiate() { + fun meshInitiationLowerPubkeyShouldInitiate() { val manager = PeerSessionManager(localPubKey = alice) assertTrue(manager.shouldInitiateOffer(bob), "Lower pubkey (alice) should initiate to higher (bob)") @@ -295,7 +295,7 @@ class PeerSessionManagerTest { } @Test - fun meshInitiation_higherPubkey_shouldWait() { + fun meshInitiationHigherPubkeyShouldWait() { val manager = PeerSessionManager(localPubKey = carol) assertFalse(manager.shouldInitiateOffer(alice), "Higher pubkey (carol) should NOT initiate to lower (alice)") @@ -307,7 +307,7 @@ class PeerSessionManagerTest { // ======================================================================== @Test - fun routeAnswer_noSession_returnsNoSession() { + fun routeAnswerNoSessionReturnsNoSession() { val manager = PeerSessionManager(localPubKey = alice) val action = manager.routeAnswer(bob, "answer-sdp") @@ -316,7 +316,7 @@ class PeerSessionManagerTest { } @Test - fun routeAnswer_wrongSignalingState_ignored() { + fun routeAnswerWrongSignalingStateIgnored() { val manager = PeerSessionManager(localPubKey = alice) val fake = FakePeerSession(signalingState = SignalingState.STABLE) manager.registerSession(bob, fake) @@ -328,7 +328,7 @@ class PeerSessionManagerTest { } @Test - fun routeAnswer_havingLocalOffer_applied() { + fun routeAnswerHavingLocalOfferApplied() { val manager = PeerSessionManager(localPubKey = alice) val fake = FakePeerSession(signalingState = SignalingState.HAVE_LOCAL_OFFER) manager.registerSession(bob, fake) @@ -351,7 +351,7 @@ class PeerSessionManagerTest { // ======================================================================== @Test - fun removeSession_disposesAndCleansUp() { + fun removeSessionDisposesAndCleansUp() { val manager = PeerSessionManager(localPubKey = bob) val fake = FakePeerSession() manager.registerSession(alice, fake) @@ -365,7 +365,7 @@ class PeerSessionManagerTest { } @Test - fun disposeAll_disposesAllSessions() { + fun disposeAllDisposesAllSessions() { val manager = PeerSessionManager(localPubKey = bob) val fakeAlice = FakePeerSession() val fakeCarol = FakePeerSession() @@ -384,7 +384,7 @@ class PeerSessionManagerTest { // ======================================================================== @Test - fun fullP2PFlow_iceBufferingThroughAllPhases() { + fun fullP2PFlowIceBufferingThroughAllPhases() { val manager = PeerSessionManager(localPubKey = bob) val fake = FakePeerSession() @@ -417,7 +417,7 @@ class PeerSessionManagerTest { // ======================================================================== @Test - fun groupCall_meshSetup_withIceBuffering() { + fun groupCallMeshSetupWithIceBuffering() { // Bob is local. Alice (caller) and Carol (other callee) are peers. val manager = PeerSessionManager(localPubKey = bob) @@ -454,7 +454,7 @@ class PeerSessionManagerTest { // ======================================================================== @Test - fun renegotiationGlare_fullFlow_lowerPubkeyRollsBack() { + fun renegotiationGlareFullFlowLowerPubkeyRollsBack() { // Alice (lower) and Bob (higher) both send renegotiation offers simultaneously // Alice's manager handles Bob's incoming offer val aliceManager = PeerSessionManager(localPubKey = alice) diff --git a/quartz/src/commonTest/kotlin/com/vitorpamplona/quartz/nipACWebRtcCalls/NipACGiftWrapRoundTripTest.kt b/quartz/src/commonTest/kotlin/com/vitorpamplona/quartz/nipACWebRtcCalls/NipACGiftWrapRoundTripTest.kt index 13589020e..581396e0b 100644 --- a/quartz/src/commonTest/kotlin/com/vitorpamplona/quartz/nipACWebRtcCalls/NipACGiftWrapRoundTripTest.kt +++ b/quartz/src/commonTest/kotlin/com/vitorpamplona/quartz/nipACWebRtcCalls/NipACGiftWrapRoundTripTest.kt @@ -74,7 +74,7 @@ class NipACGiftWrapRoundTripTest { // ======================================================================== @Test - fun callOffer_roundTrips_throughGiftWrap() = + fun callOfferRoundTripsThroughGiftWrap() = runTest { val result = factory.createCallOffer(sdpOffer, bob, callId, CallType.VIDEO, aliceSigner) @@ -98,7 +98,7 @@ class NipACGiftWrapRoundTripTest { } @Test - fun callOffer_cannotBeDecrypted_byThirdParty() = + fun callOfferCannotBeDecryptedByThirdParty() = runTest { val result = factory.createCallOffer(sdpOffer, bob, callId, CallType.VOICE, aliceSigner) @@ -112,7 +112,7 @@ class NipACGiftWrapRoundTripTest { // ======================================================================== @Test - fun callAnswer_roundTrips_throughGiftWrap() = + fun callAnswerRoundTripsThroughGiftWrap() = runTest { val result = factory.createCallAnswer(sdpAnswer, alice, callId, bobSigner) @@ -134,7 +134,7 @@ class NipACGiftWrapRoundTripTest { // ======================================================================== @Test - fun iceCandidate_roundTrips_throughGiftWrap() = + fun iceCandidateRoundTripsThroughGiftWrap() = runTest { val candidateJson = CallIceCandidateEvent.serializeCandidate( @@ -163,7 +163,7 @@ class NipACGiftWrapRoundTripTest { // ======================================================================== @Test - fun hangup_roundTrips_throughGiftWrap() = + fun hangupRoundTripsThroughGiftWrap() = runTest { val result = factory.createHangup(bob, callId, "user ended", aliceSigner) @@ -176,7 +176,7 @@ class NipACGiftWrapRoundTripTest { } @Test - fun hangup_emptyReason_roundTrips() = + fun hangupEmptyReasonRoundTrips() = runTest { val result = factory.createHangup(bob, callId, "", aliceSigner) @@ -190,7 +190,7 @@ class NipACGiftWrapRoundTripTest { // ======================================================================== @Test - fun reject_roundTrips_throughGiftWrap() = + fun rejectRoundTripsThroughGiftWrap() = runTest { val result = factory.createReject(alice, callId, "", bobSigner) @@ -202,7 +202,7 @@ class NipACGiftWrapRoundTripTest { } @Test - fun busyReject_roundTrips_throughGiftWrap() = + fun busyRejectRoundTripsThroughGiftWrap() = runTest { val result = factory.createReject(alice, callId, "busy", bobSigner) @@ -216,7 +216,7 @@ class NipACGiftWrapRoundTripTest { // ======================================================================== @Test - fun renegotiate_roundTrips_throughGiftWrap() = + fun renegotiateRoundTripsThroughGiftWrap() = runTest { val newSdp = "v=0\r\no=- 4611731400430051338 3 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0" val result = factory.createRenegotiate(newSdp, bob, callId, aliceSigner) @@ -234,7 +234,7 @@ class NipACGiftWrapRoundTripTest { // ======================================================================== @Test - fun groupCallOffer_perPeerWraps_eachDecryptableOnlyByTarget() = + fun groupCallOfferPerPeerWrapsEachDecryptableOnlyByTarget() = runTest { val result = factory.createGroupCallOffer( @@ -281,7 +281,7 @@ class NipACGiftWrapRoundTripTest { } @Test - fun groupCallAnswer_broadcastWraps_eachDecryptableByTarget() = + fun groupCallAnswerBroadcastWrapsEachDecryptableByTarget() = runTest { val allMembers = setOf(alice, bob, carol) val result = factory.createGroupCallAnswer(sdpAnswer, allMembers, callId, bobSigner) @@ -311,7 +311,7 @@ class NipACGiftWrapRoundTripTest { } @Test - fun groupHangup_allMembers_receiveIdenticalInnerEvent() = + fun groupHangupAllMembersReceiveIdenticalInnerEvent() = runTest { val members = setOf(bob, carol) val result = factory.createGroupHangup(members, callId, "leaving", aliceSigner) @@ -336,7 +336,7 @@ class NipACGiftWrapRoundTripTest { } @Test - fun groupReject_allMembers_receiveIdenticalInnerEvent() = + fun groupRejectAllMembersReceiveIdenticalInnerEvent() = runTest { val members = setOf(alice, carol) val result = factory.createGroupReject(members, callId, "busy", bobSigner) @@ -360,7 +360,7 @@ class NipACGiftWrapRoundTripTest { // ======================================================================== @Test - fun fullP2PFlow_allSignalingEvents_roundTrip() = + fun fullP2PFlowAllSignalingEventsRoundTrip() = runTest { // Step 1: Alice sends offer to Bob val offerResult = factory.createCallOffer(sdpOffer, bob, callId, CallType.VIDEO, aliceSigner) @@ -413,7 +413,7 @@ class NipACGiftWrapRoundTripTest { // ======================================================================== @Test - fun wrapMetadata_isCorrect() = + fun wrapMetadataIsCorrect() = runTest { val result = factory.createCallOffer(sdpOffer, bob, callId, CallType.VOICE, aliceSigner) val wrap = result.wrap @@ -426,7 +426,7 @@ class NipACGiftWrapRoundTripTest { } @Test - fun eachWrap_usesUniqueEphemeralKey() = + fun eachWrapUsesUniqueEphemeralKey() = runTest { val result1 = factory.createCallOffer(sdpOffer, bob, callId, CallType.VOICE, aliceSigner) val result2 = factory.createCallOffer(sdpOffer, bob, callId, CallType.VOICE, aliceSigner) @@ -443,7 +443,7 @@ class NipACGiftWrapRoundTripTest { // ======================================================================== @Test - fun innerEventSignature_isVerifiable_afterUnwrap() = + fun innerEventSignatureIsVerifiableAfterUnwrap() = runTest { val result = factory.createCallOffer(sdpOffer, bob, callId, CallType.VIDEO, aliceSigner) val inner = result.wrap.unwrapThrowing(bobSigner) @@ -458,7 +458,7 @@ class NipACGiftWrapRoundTripTest { // ======================================================================== @Test - fun sdpWithSpecialChars_survivesGiftWrapRoundTrip() = + fun sdpWithSpecialCharsSurvivesGiftWrapRoundTrip() = runTest { val complexSdp = "v=0\r\n" + @@ -481,7 +481,7 @@ class NipACGiftWrapRoundTripTest { } @Test - fun iceCandidateWithSpecialChars_survivesGiftWrapRoundTrip() = + fun iceCandidateWithSpecialCharsSurvivesGiftWrapRoundTrip() = runTest { val candidateSdp = """candidate:842163049 1 udp 1677729535 203.0.113.1 44323 typ srflx raddr 0.0.0.0 rport 0 generation 0 ufrag abc+def network-id 1""" val json = CallIceCandidateEvent.serializeCandidate(candidateSdp, "audio", 0) @@ -498,7 +498,7 @@ class NipACGiftWrapRoundTripTest { // ======================================================================== @Test - fun groupOfferWithContext_perPeerSdp_allPTagsVisible() = + fun groupOfferWithContextPerPeerSdpAllPTagsVisible() = runTest { // Caller creates per-peer offer using the group-context overload val bobResult =