From 3a4463095fc2a49b41a21b729568a40abf5ef308 Mon Sep 17 00:00:00 2001 From: Martyn Whitwell Date: Thu, 9 Jan 2025 18:02:54 +0000 Subject: [PATCH] add more tests --- .../TeacherTrainingAdviserSignUpTests.cs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/GetIntoTeachingApiTests/Models/TeacherTrainingAdviser/TeacherTrainingAdviserSignUpTests.cs b/GetIntoTeachingApiTests/Models/TeacherTrainingAdviser/TeacherTrainingAdviserSignUpTests.cs index 424f149e..4694417c 100644 --- a/GetIntoTeachingApiTests/Models/TeacherTrainingAdviser/TeacherTrainingAdviserSignUpTests.cs +++ b/GetIntoTeachingApiTests/Models/TeacherTrainingAdviser/TeacherTrainingAdviserSignUpTests.cs @@ -288,6 +288,24 @@ public void Candidate_ChannelIdWhenCandidateIdIsNotNull_IsNotChanged() request.Candidate.ChangedPropertyNames.Should().NotContain("ChannelId"); } + [Fact] + public void Candidate_ContactChannelCreationWhenCandidateIdIsNull() + { + var request = new TeacherTrainingAdviserSignUp() + { + CandidateId = null, + CreationChannelSourceId = 222750000, + CreationChannelServiceId = 222750001, + CreationChannelActivityId = 222750002, + }; + + request.Candidate.ChannelId.Should().BeNull(); + request.Candidate.ChangedPropertyNames.Should().Contain("ContactChannelCreations"); + request.Candidate.ContactChannelCreations.First().CreationChannelSourceId.Should().Be(222750000); + request.Candidate.ContactChannelCreations.First().CreationChannelServiceId.Should().Be(222750001); + request.Candidate.ContactChannelCreations.First().CreationChannelActivityId.Should().Be(222750002); + } + [Fact] public void Candidate_ContactChannelCreationWhenCandidateIdIsNotNull() {