public async Task EvaluatedCallForSpeechByIdShouldBeSuccess() { CreateCategoriesAsync(); CreateJudgeAsync(); CallForSpeechSubmitDoer callForSpeechSubmitDoer = new CallForSpeechSubmitDoer(_geekLemonContex, _mapper); var cfs = GivenCallForSpeech().WithCategory (c => c.WithId(1)) .Evaluated().Build(); var status = await callForSpeechSubmitDoer.Run(cfs); CallForSpeechSaveEvaluatationDoer callForSpeechSaveEvaluatationDoer = new CallForSpeechSaveEvaluatationDoer(_geekLemonContex, _mapper); JudgeId judgeId = new JudgeId(1); var status2 = await callForSpeechSaveEvaluatationDoer.Run (cfs.Id, cfs.ScoreResult, cfs.Status); status2.Success.Should().BeTrue(); CallForSpeechGetByIdDoer callForSpeechGetByIdDoer = new CallForSpeechGetByIdDoer(_geekLemonContex, _mapper); var status3 = await callForSpeechGetByIdDoer.Run (status.Value.CreatedId as CallForSpeechId); status3.Success.Should().BeTrue(); status3.Value.Should().NotBeSameAs(cfs); }
public async Task PreliminaryAcceptenceCallForSpeechByUniqueIdShouldBeSuccess() { CreateCategoriesAsync(); CreateJudgeAsync(); CallForSpeechSubmitDoer callForSpeechSubmitDoer = new CallForSpeechSubmitDoer(_geekLemonContex, _mapper); var cfs = GivenCallForSpeech().WithCategory (c => c.WithId(1)) .Build(); var status = await callForSpeechSubmitDoer.Run(cfs); CallForSpeechSavePreliminaryAcceptenceDoer callForSpeechSavePreliminaryAcceptenceDoer = new CallForSpeechSavePreliminaryAcceptenceDoer(_geekLemonContex, _mapper); JudgeId judgeId = new JudgeId(1); var status2 = await callForSpeechSavePreliminaryAcceptenceDoer.Run(cfs.UniqueId, judgeId, Domain.ValueObjects.CallForSpeechStatus.AcceptedByJudge); status2.Success.Should().BeTrue(); CallForSpeechGetByIdDoer callForSpeechGetByIdDoer = new CallForSpeechGetByIdDoer(_geekLemonContex, _mapper); var status3 = await callForSpeechGetByIdDoer.Run (status.Value.UniqueId as CallForSpeechUniqueId); status3.Success.Should().BeTrue(); status3.Value.Should().NotBeSameAs(cfs); }
public async Task SubmitCallForSpeechShouldBeSuccess() { CategoryAddDoer categoryAddDoer = new CategoryAddDoer(_geekLemonContex, _mapper); var cat = GivenCategory().WithId(1).WithName("AAA") .Build(); var st1 = await categoryAddDoer.Run(cat); //SetupCategories(); CallForSpeechSubmitDoer callForSpeechSubmitDoer = new CallForSpeechSubmitDoer(_geekLemonContex, _mapper); var cfs = GivenCallForSpeech().WithCategory (c => c.WithId(1)) .Build(); var status = await callForSpeechSubmitDoer.Run(cfs); status.Success.Should().BeTrue(); }