public async Task ReconnectTeam_TeamAndMemberName_ReturnsScrumTeamWithEstimationFinishedAndEstimationIsNull()
        {
            await using var fixture = new PlanningPokerSignalRClientFixture();

            var resultTask = fixture.Target.ReconnectTeam(PlanningPokerData.TeamName, PlanningPokerData.ScrumMasterName, fixture.CancellationToken);

            var sentMessage = await fixture.GetSentMessage();

            var invocationId = GetInvocationId(sentMessage);

            var estimationResult = PlanningPokerData.GetEstimationResult(scrumMasterEstimation: 8, memberEstimation: double.NaN);
            var scrumTeam        = PlanningPokerData.GetScrumTeam(member: true, state: TeamState.EstimationFinished, estimationResult: estimationResult);
            var reconnectResult  = PlanningPokerData.GetReconnectTeamResultJson(scrumTeam, lastMessageId: 2157483849, selectedEstimation: 8);
            var returnMessage    = new CompletionMessage(invocationId, null, reconnectResult, true);
            await fixture.ReceiveMessage(returnMessage);

            var result = await resultTask;

            Assert.AreEqual(reconnectResult, result);
            AssertAvailableEstimations(result.ScrumTeam);
            Assert.IsNotNull(result.SelectedEstimation);
            Assert.AreEqual(8.0, result.SelectedEstimation.Value);
            Assert.AreEqual(8.0, result.ScrumTeam.EstimationResult[0].Estimation.Value);
            Assert.IsNull(result.ScrumTeam.EstimationResult[1].Estimation);
        }
        public async Task ReconnectTeam_TeamAndMemberName_ReturnsScrumTeam()
        {
            await using var fixture = new PlanningPokerSignalRClientFixture();

            var resultTask = fixture.Target.ReconnectTeam(PlanningPokerData.TeamName, PlanningPokerData.MemberName, fixture.CancellationToken);

            var sentMessage = await fixture.GetSentMessage();

            var invocationId = GetInvocationId(sentMessage);

            var scrumTeam       = PlanningPokerData.GetScrumTeam(member: true);
            var reconnectResult = PlanningPokerData.GetReconnectTeamResultJson(scrumTeam);
            var returnMessage   = new CompletionMessage(invocationId, null, reconnectResult, true);
            await fixture.ReceiveMessage(returnMessage);

            var result = await resultTask;

            Assert.AreEqual(reconnectResult, result);
            AssertAvailableEstimations(result.ScrumTeam);
            Assert.IsNull(reconnectResult.SelectedEstimation);
        }
        public async Task ReconnectTeam_TeamNameAndMemberName_InvocationMessageIsSent()
        {
            await using var fixture = new PlanningPokerSignalRClientFixture();

            var resultTask = fixture.Target.ReconnectTeam(PlanningPokerData.TeamName, PlanningPokerData.MemberName, fixture.CancellationToken);

            var sentMessage = await fixture.GetSentMessage();

            var sentInvocationMessage = AssertIsInvocationMessage(sentMessage);

            Assert.AreEqual("ReconnectTeam", sentInvocationMessage.Target);
            var expectedArguments = new object[] { PlanningPokerData.TeamName, PlanningPokerData.MemberName };

            CollectionAssert.AreEqual(expectedArguments, sentInvocationMessage.Arguments);

            var scrumTeam       = PlanningPokerData.GetScrumTeam(member: true);
            var reconnectResult = PlanningPokerData.GetReconnectTeamResultJson(scrumTeam);
            var returnMessage   = new CompletionMessage(sentInvocationMessage.InvocationId, null, reconnectResult, true);
            await fixture.ReceiveMessage(returnMessage);

            await resultTask;
        }
        public async Task ReconnectTeam_TeamAndMemberName_ReturnsScrumTeamWithEstimationInProgress()
        {
            await using var fixture = new PlanningPokerSignalRClientFixture();

            var resultTask = fixture.Target.ReconnectTeam(PlanningPokerData.TeamName, PlanningPokerData.ScrumMasterName, fixture.CancellationToken);

            var sentMessage = await fixture.GetSentMessage();

            var invocationId = GetInvocationId(sentMessage);

            var estimationParticipants = PlanningPokerData.GetEstimationParticipants(scrumMaster: false, member: true);
            var scrumTeam       = PlanningPokerData.GetScrumTeam(member: true, state: TeamState.EstimationInProgress, estimationParticipants: estimationParticipants);
            var reconnectResult = PlanningPokerData.GetReconnectTeamResultJson(scrumTeam, lastMessageId: 1, selectedEstimation: null);
            var returnMessage   = new CompletionMessage(invocationId, null, reconnectResult, true);
            await fixture.ReceiveMessage(returnMessage);

            var result = await resultTask;

            Assert.AreEqual(reconnectResult, result);
            AssertAvailableEstimations(result.ScrumTeam);
            Assert.IsNotNull(result.SelectedEstimation);
            Assert.IsNull(result.SelectedEstimation.Value);
        }