Skip to content

Commit

Permalink
Changes to support testing previous names (#841)
Browse files Browse the repository at this point in the history
* Changes to support testing previous names

* Added generated code

* Attempt to fix flakey test

* Changes following PR comments
  • Loading branch information
hortha authored Sep 29, 2023
1 parent 01ffe18 commit e3117c0
Show file tree
Hide file tree
Showing 11 changed files with 5,119 additions and 3,246 deletions.
7,835 changes: 4,619 additions & 3,216 deletions TeachingRecordSystem/src/TeachingRecordSystem.Core/Dqt/Models/GeneratedCode.cs

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -1818,6 +1818,27 @@ public enum dfeta_MRApplicationDocumentType
Training = 389040002,
}

[System.Runtime.Serialization.DataContractAttribute()]
public enum dfeta_NameType
{

[System.Runtime.Serialization.EnumMemberAttribute()]
[OptionSetMetadataAttribute("First Name", 1)]
FirstName = 389040000,

[System.Runtime.Serialization.EnumMemberAttribute()]
[OptionSetMetadataAttribute("Last Name", 3)]
LastName = 389040002,

[System.Runtime.Serialization.EnumMemberAttribute()]
[OptionSetMetadataAttribute("Middle Name", 2)]
MiddleName = 389040001,

[System.Runtime.Serialization.EnumMemberAttribute()]
[OptionSetMetadataAttribute("Title", 0)]
Title = 389040003,
}

[System.Runtime.Serialization.DataContractAttribute()]
public enum dfeta_PersonTitle
{
Expand Down Expand Up @@ -1919,6 +1940,19 @@ public enum dfeta_PersonTitle
Sister = 389040022,
}

[System.Runtime.Serialization.DataContractAttribute()]
public enum dfeta_previousname_StatusCode
{

[System.Runtime.Serialization.EnumMemberAttribute()]
[OptionSetMetadataAttribute("Active", 0)]
Active = 1,

[System.Runtime.Serialization.EnumMemberAttribute()]
[OptionSetMetadataAttribute("Inactive", 1)]
Inactive = 2,
}

[System.Runtime.Serialization.DataContractAttribute()]
public enum dfeta_qtsregistration_StatusCode
{
Expand Down Expand Up @@ -2346,6 +2380,193 @@ public enum msft_DataState
Retain = 1,
}

[System.Runtime.Serialization.DataContractAttribute()]
#pragma warning disable CS8981 // The type name only contains lower-cased ascii characters. Such names may become reserved for the language.
public enum powerpagelanguages
#pragma warning restore CS8981 // The type name only contains lower-cased ascii characters. Such names may become reserved for the language.
{

[System.Runtime.Serialization.EnumMemberAttribute()]
[OptionSetMetadataAttribute("Arabic", 0, "#0000ff")]
Arabic = 1025,

[System.Runtime.Serialization.EnumMemberAttribute()]
[OptionSetMetadataAttribute("Basque - Basque", 1, "#0000ff")]
BasqueBasque = 1069,

[System.Runtime.Serialization.EnumMemberAttribute()]
[OptionSetMetadataAttribute("Bulgarian - Bulgaria", 2, "#0000ff")]
BulgarianBulgaria = 1026,

[System.Runtime.Serialization.EnumMemberAttribute()]
[OptionSetMetadataAttribute("Catalan - Catalan", 3, "#0000ff")]
CatalanCatalan = 1027,

[System.Runtime.Serialization.EnumMemberAttribute()]
[OptionSetMetadataAttribute("Chinese - China", 4, "#0000ff")]
ChineseChina = 2052,

[System.Runtime.Serialization.EnumMemberAttribute()]
[OptionSetMetadataAttribute("Chinese - Hong Kong SAR", 5, "#0000ff")]
ChineseHongKongSAR = 3076,

[System.Runtime.Serialization.EnumMemberAttribute()]
[OptionSetMetadataAttribute("Chinese - Traditional", 6, "#0000ff")]
ChineseTraditional = 1028,

[System.Runtime.Serialization.EnumMemberAttribute()]
[OptionSetMetadataAttribute("Croatian - Croatia", 7, "#0000ff")]
CroatianCroatia = 1050,

[System.Runtime.Serialization.EnumMemberAttribute()]
[OptionSetMetadataAttribute("Czech - Czech Republic", 8, "#0000ff")]
CzechCzechRepublic = 1029,

[System.Runtime.Serialization.EnumMemberAttribute()]
[OptionSetMetadataAttribute("Danish - Denmark", 9, "#0000ff")]
DanishDenmark = 1030,

[System.Runtime.Serialization.EnumMemberAttribute()]
[OptionSetMetadataAttribute("Dutch - Netherlands", 10, "#0000ff")]
DutchNetherlands = 1043,

[System.Runtime.Serialization.EnumMemberAttribute()]
[OptionSetMetadataAttribute("English", 11, "#0000ff")]
English = 1033,

[System.Runtime.Serialization.EnumMemberAttribute()]
[OptionSetMetadataAttribute("Estonian - Estonia", 12, "#0000ff")]
EstonianEstonia = 1061,

[System.Runtime.Serialization.EnumMemberAttribute()]
[OptionSetMetadataAttribute("Finnish - Finland", 13, "#0000ff")]
FinnishFinland = 1035,

[System.Runtime.Serialization.EnumMemberAttribute()]
[OptionSetMetadataAttribute("French - France", 14, "#0000ff")]
FrenchFrance = 1036,

[System.Runtime.Serialization.EnumMemberAttribute()]
[OptionSetMetadataAttribute("Galician - Spain", 15, "#0000ff")]
GalicianSpain = 1110,

[System.Runtime.Serialization.EnumMemberAttribute()]
[OptionSetMetadataAttribute("German - Germany", 16, "#0000ff")]
GermanGermany = 1031,

[System.Runtime.Serialization.EnumMemberAttribute()]
[OptionSetMetadataAttribute("Greek - Greece", 17, "#0000ff")]
GreekGreece = 1032,

[System.Runtime.Serialization.EnumMemberAttribute()]
[OptionSetMetadataAttribute("Hebrew", 18, "#0000ff")]
Hebrew = 1037,

[System.Runtime.Serialization.EnumMemberAttribute()]
[OptionSetMetadataAttribute("Hindi - India", 19, "#0000ff")]
HindiIndia = 1081,

[System.Runtime.Serialization.EnumMemberAttribute()]
[OptionSetMetadataAttribute("Hungarian - Hungary", 20, "#0000ff")]
HungarianHungary = 1038,

[System.Runtime.Serialization.EnumMemberAttribute()]
[OptionSetMetadataAttribute("Indonesian - Indonesia", 21, "#0000ff")]
IndonesianIndonesia = 1057,

[System.Runtime.Serialization.EnumMemberAttribute()]
[OptionSetMetadataAttribute("Italian - Italy", 22, "#0000ff")]
ItalianItaly = 1040,

[System.Runtime.Serialization.EnumMemberAttribute()]
[OptionSetMetadataAttribute("Japanese - Japan", 23, "#0000ff")]
JapaneseJapan = 1041,

[System.Runtime.Serialization.EnumMemberAttribute()]
[OptionSetMetadataAttribute("Kazakh - Kazakhstan", 24, "#0000ff")]
KazakhKazakhstan = 1087,

[System.Runtime.Serialization.EnumMemberAttribute()]
[OptionSetMetadataAttribute("Korean - Korea", 25, "#0000ff")]
KoreanKorea = 1042,

[System.Runtime.Serialization.EnumMemberAttribute()]
[OptionSetMetadataAttribute("Latvian - Latvia", 26, "#0000ff")]
LatvianLatvia = 1062,

[System.Runtime.Serialization.EnumMemberAttribute()]
[OptionSetMetadataAttribute("Lithuanian - Lithuania", 27, "#0000ff")]
LithuanianLithuania = 1063,

[System.Runtime.Serialization.EnumMemberAttribute()]
[OptionSetMetadataAttribute("Malay - Malaysia", 28, "#0000ff")]
MalayMalaysia = 1086,

[System.Runtime.Serialization.EnumMemberAttribute()]
[OptionSetMetadataAttribute("Norwegian (Bokmål) - Norway", 29, "#0000ff")]
Norwegian_BokmlNorway = 1044,

[System.Runtime.Serialization.EnumMemberAttribute()]
[OptionSetMetadataAttribute("Polish - Poland", 30, "#0000ff")]
PolishPoland = 1045,

[System.Runtime.Serialization.EnumMemberAttribute()]
[OptionSetMetadataAttribute("Portuguese - Brazil", 31, "#0000ff")]
PortugueseBrazil = 1046,

[System.Runtime.Serialization.EnumMemberAttribute()]
[OptionSetMetadataAttribute("Portuguese - Portugal", 32, "#0000ff")]
PortuguesePortugal = 2070,

[System.Runtime.Serialization.EnumMemberAttribute()]
[OptionSetMetadataAttribute("Romanian - Romania", 33, "#0000ff")]
RomanianRomania = 1048,

[System.Runtime.Serialization.EnumMemberAttribute()]
[OptionSetMetadataAttribute("Russian - Russia", 34, "#0000ff")]
RussianRussia = 1049,

[System.Runtime.Serialization.EnumMemberAttribute()]
[OptionSetMetadataAttribute("Serbian (Cyrillic) - Serbia", 35, "#0000ff")]
Serbian_CyrillicSerbia = 3098,

[System.Runtime.Serialization.EnumMemberAttribute()]
[OptionSetMetadataAttribute("Serbian (Latin) - Serbia", 36, "#0000ff")]
Serbian_LatinSerbia = 2074,

[System.Runtime.Serialization.EnumMemberAttribute()]
[OptionSetMetadataAttribute("Slovak - Slovakia", 37, "#0000ff")]
SlovakSlovakia = 1051,

[System.Runtime.Serialization.EnumMemberAttribute()]
[OptionSetMetadataAttribute("Slovenian - Slovenia", 38, "#0000ff")]
SlovenianSlovenia = 1060,

[System.Runtime.Serialization.EnumMemberAttribute()]
[OptionSetMetadataAttribute("Spanish (Traditional Sort) - Spain", 39, "#0000ff")]
Spanish_TraditionalSortSpain = 3082,

[System.Runtime.Serialization.EnumMemberAttribute()]
[OptionSetMetadataAttribute("Swedish - Sweden", 40, "#0000ff")]
SwedishSweden = 1053,

[System.Runtime.Serialization.EnumMemberAttribute()]
[OptionSetMetadataAttribute("Thai - Thailand", 41, "#0000ff")]
ThaiThailand = 1054,

[System.Runtime.Serialization.EnumMemberAttribute()]
[OptionSetMetadataAttribute("Turkish - Türkiye", 42, "#0000ff")]
TurkishTrkiye = 1055,

[System.Runtime.Serialization.EnumMemberAttribute()]
[OptionSetMetadataAttribute("Ukrainian - Ukraine", 43, "#0000ff")]
UkrainianUkraine = 1058,

[System.Runtime.Serialization.EnumMemberAttribute()]
[OptionSetMetadataAttribute("Vietnamese - Vietnam", 44, "#0000ff")]
VietnameseVietnam = 1066,
}

[System.Runtime.Serialization.DataContractAttribute()]
public enum SdkMessageProcessingStep_InvocationSource
{
Expand Down Expand Up @@ -2463,6 +2684,23 @@ public enum SdkMessageProcessingStep_SupportedDeployment
ServerOnly = 0,
}

[System.Runtime.Serialization.DataContractAttribute()]
public enum SdkMessageProcessingStepImage_ImageType
{

[System.Runtime.Serialization.EnumMemberAttribute()]
[OptionSetMetadataAttribute("Both", 2)]
Both = 2,

[System.Runtime.Serialization.EnumMemberAttribute()]
[OptionSetMetadataAttribute("PostImage", 1)]
PostImage = 1,

[System.Runtime.Serialization.EnumMemberAttribute()]
[OptionSetMetadataAttribute("PreImage", 0)]
PreImage = 0,
}

[System.Runtime.Serialization.DataContractAttribute()]
public enum ServiceStage
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,10 @@ public async Task Get_ValidRequestWithMatchOnPreviousName_ReturnsMappedContacts(
var dateOfBirth = new DateOnly(1990, 1, 1);

var person1 = await TestData.CreatePerson(b => b.WithLastName(lastName).WithDateOfBirth(dateOfBirth).WithSanction("G1"));
var person2 = await TestData.CreatePerson(b => b.WithLastName(TestData.GenerateChangedLastName(lastName)).WithPreviousLastName(lastName).WithDateOfBirth(dateOfBirth).WithSanction("G1"));
var person2 = await TestData.CreatePerson(b => b.WithLastName(lastName).WithDateOfBirth(dateOfBirth).WithSanction("G1"));
var person3 = await TestData.CreatePerson(b => b.WithLastName(TestData.GenerateChangedLastName(lastName)).WithDateOfBirth(dateOfBirth));
var updatedLastName = TestData.GenerateChangedLastName(lastName);
await TestData.UpdatePerson(b => b.WithPersonId(person2.PersonId).WithUpdatedName(person2.FirstName, person2.MiddleName, updatedLastName));

var request = new HttpRequestMessage(
HttpMethod.Get,
Expand Down Expand Up @@ -175,7 +177,7 @@ await AssertEx.JsonResponseEquals(
dateOfBirth = person2.DateOfBirth,
firstName = person2.FirstName,
middleName = person2.MiddleName,
lastName = person2.LastName,
lastName = updatedLastName,
sanctions = new[]
{
new
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,7 @@ public async Task WhenCalled_ForContactWithSanctions_ReturnsSanctionsAsExpected(

// Assert
Assert.Equal(2, sanctions.Length);
Assert.Collection(
sanctions,
s => Assert.Equal(sanction1CodeName, s.Description),
s => Assert.Equal(sanction2CodeName, s.Description));
Assert.Contains(sanction1CodeName, sanctions.Select(s => s.Description));
Assert.Contains(sanction2CodeName, sanctions.Select(s => s.Description));
}
}
Loading

0 comments on commit e3117c0

Please sign in to comment.