Skip to content

Commit c987a82

Browse files
committed
CHORE: Update XrmContext version and generated test context
1 parent 9b4cdaa commit c987a82

61 files changed

Lines changed: 6168 additions & 6183 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.config/dotnet-tools.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"isRoot": true,
44
"tools": {
55
"xrmcontext": {
6-
"version": "4.0.0-beta.20",
6+
"version": "4.0.0-beta.24",
77
"commands": [
88
"xrmcontext"
99
],

XrmPluginCore.SourceGenerator.Tests/DiagnosticTests/DiagnosticReportingTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1047,14 +1047,14 @@ public void HandleUpdate() { }
10471047
var namespace1Source = sourcesByHintName[namespace1HintName];
10481048
namespace1Source.Should().Contain("namespace Namespace1.PluginRegistrations.AccountPlugin.AccountUpdatePostOperation",
10491049
"Namespace1 hint name should map to Namespace1 generated namespace");
1050-
namespace1Source.Should().Contain("public string Name =>",
1050+
namespace1Source.Should().Contain("public string? Name =>",
10511051
"Namespace1 plugin registered Name attribute");
10521052

10531053
// Verify Namespace2 source: correct namespace AND correct property (AccountNumber)
10541054
var namespace2Source = sourcesByHintName[namespace2HintName];
10551055
namespace2Source.Should().Contain("namespace Namespace2.PluginRegistrations.AccountPlugin.AccountUpdatePostOperation",
10561056
"Namespace2 hint name should map to Namespace2 generated namespace");
1057-
namespace2Source.Should().Contain("public string AccountNumber =>",
1057+
namespace2Source.Should().Contain("public string? AccountNumber =>",
10581058
"Namespace2 plugin registered AccountNumber attribute");
10591059

10601060
// Verify each source only contains its own namespace (not cross-contaminated)

XrmPluginCore.SourceGenerator.Tests/GenerationTests/WrapperClassGenerationTests.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public void Should_Generate_PostImage_Class_With_Properties()
6161
generatedSource.Should().Contain($"Entity = entity.ToEntity<{ContextNamespace}.Account>();");
6262

6363
// Verify properties forward to Entity
64-
generatedSource.Should().Contain("public string Name => Entity.Name;");
64+
generatedSource.Should().Contain("public string? Name => Entity.Name;");
6565

6666
HasAccountNumberSummary().Matches(generatedSource).Count.Should().Be(1, $"AccountNumber property should have correct XML summary. Generated source:\n{generatedSource}");
6767

@@ -116,15 +116,15 @@ public void Should_Generate_Properties_With_Correct_Types(string entityType)
116116
// Verify properties forward to Entity with correct types
117117
if (entityType == "Account")
118118
{
119-
generatedSource.Should().Contain("public string Name => Entity.Name;");
119+
generatedSource.Should().Contain("public string? Name => Entity.Name;");
120120
generatedSource.Should().Contain("public decimal? Revenue => Entity.Revenue;");
121121
generatedSource.Should().Contain("public XrmPluginCore.Tests.Context.BusinessDomain.account_industrycode? IndustryCode => Entity.IndustryCode;");
122122
}
123123
else
124124
{
125-
generatedSource.Should().Contain("public string FirstName => Entity.FirstName;");
125+
generatedSource.Should().Contain("public string? FirstName => Entity.FirstName;");
126126
generatedSource.Should().Contain("public Microsoft.Xrm.Sdk.EntityReference? AccountId => Entity.AccountId;");
127-
generatedSource.Should().Contain("public string EMailAddress1 => Entity.EMailAddress1;");
127+
generatedSource.Should().Contain("public string? EMailAddress1 => Entity.EMailAddress1;");
128128
}
129129
}
130130

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
namespace XrmPluginCore.Tests.Context.BusinessDomain;
22

3-
[System.CodeDom.Compiler.GeneratedCode("DataverseProxyGenerator", "4.0.0.20")]
3+
[System.CodeDom.Compiler.GeneratedCode("DataverseProxyGenerator", "4.0.0.24")]
44
[AttributeUsage(AttributeTargets.Field, AllowMultiple = true)]
55
public sealed class OptionSetMetadataAttribute : Attribute
66
{
7-
public string Label { get; }
7+
public string Label { get; }
88

9-
public int Lcid { get; }
9+
public int Lcid { get; }
1010

11-
public OptionSetMetadataAttribute(string label, int lcid)
12-
{
13-
Label = label;
14-
Lcid = lcid;
15-
}
11+
public OptionSetMetadataAttribute(string label, int lcid)
12+
{
13+
Label = label;
14+
Lcid = lcid;
15+
}
1616
}
Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
namespace XrmPluginCore.Tests.Context.BusinessDomain;
22

3-
[System.CodeDom.Compiler.GeneratedCode("DataverseProxyGenerator", "4.0.0.20")]
3+
[System.CodeDom.Compiler.GeneratedCode("DataverseProxyGenerator", "4.0.0.24")]
44
[AttributeUsage(AttributeTargets.Property, AllowMultiple = false)]
55
public sealed class RelationshipMetadataAttribute : Attribute
66
{
7-
public string RelationshipType { get; }
8-
public string? ThisEntityAttribute { get; }
9-
public string? RelatedEntity { get; }
10-
public string? RelatedEntityAttribute { get; }
11-
public string? ThisEntityRole { get; }
7+
public string RelationshipType { get; }
8+
public string? ThisEntityAttribute { get; }
9+
public string? RelatedEntity { get; }
10+
public string? RelatedEntityAttribute { get; }
11+
public string? ThisEntityRole { get; }
1212

13-
public RelationshipMetadataAttribute(
14-
string relationshipType,
15-
string? thisEntityAttribute = null,
16-
string? relatedEntity = null,
17-
string? relatedEntityAttribute = null,
18-
string? thisEntityRole = null)
19-
{
20-
RelationshipType = relationshipType;
21-
ThisEntityAttribute = thisEntityAttribute;
22-
RelatedEntity = relatedEntity;
23-
RelatedEntityAttribute = relatedEntityAttribute;
24-
ThisEntityRole = thisEntityRole;
25-
}
13+
public RelationshipMetadataAttribute(
14+
string relationshipType,
15+
string? thisEntityAttribute = null,
16+
string? relatedEntity = null,
17+
string? relatedEntityAttribute = null,
18+
string? thisEntityRole = null)
19+
{
20+
RelationshipType = relationshipType;
21+
ThisEntityAttribute = thisEntityAttribute;
22+
RelatedEntity = relatedEntity;
23+
RelatedEntityAttribute = relatedEntityAttribute;
24+
ThisEntityRole = thisEntityRole;
25+
}
2626
}

XrmPluginCore.Tests.Context/BusinessDomain/optionsets/account_accountcategorycode.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22

33
namespace XrmPluginCore.Tests.Context.BusinessDomain;
44

5-
[System.CodeDom.Compiler.GeneratedCode("DataverseProxyGenerator", "4.0.0.20")]
5+
[System.CodeDom.Compiler.GeneratedCode("DataverseProxyGenerator", "4.0.0.24")]
66
[DataContract]
77
#pragma warning disable CS8981
88
public enum account_accountcategorycode
99
#pragma warning restore CS8981
1010
{
11-
[EnumMember]
12-
[OptionSetMetadata("Preferred Customer", 1033)]
13-
PreferredCustomer = 1,
11+
[EnumMember]
12+
[OptionSetMetadata("Preferred Customer", 1033)]
13+
PreferredCustomer = 1,
1414

15-
[EnumMember]
16-
[OptionSetMetadata("Standard", 1033)]
17-
Standard = 2,
15+
[EnumMember]
16+
[OptionSetMetadata("Standard", 1033)]
17+
Standard = 2,
1818
}

XrmPluginCore.Tests.Context/BusinessDomain/optionsets/account_accountclassificationcode.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
namespace XrmPluginCore.Tests.Context.BusinessDomain;
44

5-
[System.CodeDom.Compiler.GeneratedCode("DataverseProxyGenerator", "4.0.0.20")]
5+
[System.CodeDom.Compiler.GeneratedCode("DataverseProxyGenerator", "4.0.0.24")]
66
[DataContract]
77
#pragma warning disable CS8981
88
public enum account_accountclassificationcode
99
#pragma warning restore CS8981
1010
{
11-
[EnumMember]
12-
[OptionSetMetadata("Default Value", 1033)]
13-
DefaultValue = 1,
11+
[EnumMember]
12+
[OptionSetMetadata("Default Value", 1033)]
13+
DefaultValue = 1,
1414
}

XrmPluginCore.Tests.Context/BusinessDomain/optionsets/account_accountratingcode.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
namespace XrmPluginCore.Tests.Context.BusinessDomain;
44

5-
[System.CodeDom.Compiler.GeneratedCode("DataverseProxyGenerator", "4.0.0.20")]
5+
[System.CodeDom.Compiler.GeneratedCode("DataverseProxyGenerator", "4.0.0.24")]
66
[DataContract]
77
#pragma warning disable CS8981
88
public enum account_accountratingcode
99
#pragma warning restore CS8981
1010
{
11-
[EnumMember]
12-
[OptionSetMetadata("Default Value", 1033)]
13-
DefaultValue = 1,
11+
[EnumMember]
12+
[OptionSetMetadata("Default Value", 1033)]
13+
DefaultValue = 1,
1414
}

XrmPluginCore.Tests.Context/BusinessDomain/optionsets/account_address1_addresstypecode.cs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,25 @@
22

33
namespace XrmPluginCore.Tests.Context.BusinessDomain;
44

5-
[System.CodeDom.Compiler.GeneratedCode("DataverseProxyGenerator", "4.0.0.20")]
5+
[System.CodeDom.Compiler.GeneratedCode("DataverseProxyGenerator", "4.0.0.24")]
66
[DataContract]
77
#pragma warning disable CS8981
88
public enum account_address1_addresstypecode
99
#pragma warning restore CS8981
1010
{
11-
[EnumMember]
12-
[OptionSetMetadata("Bill To", 1033)]
13-
BillTo = 1,
11+
[EnumMember]
12+
[OptionSetMetadata("Bill To", 1033)]
13+
BillTo = 1,
1414

15-
[EnumMember]
16-
[OptionSetMetadata("Ship To", 1033)]
17-
ShipTo = 2,
15+
[EnumMember]
16+
[OptionSetMetadata("Ship To", 1033)]
17+
ShipTo = 2,
1818

19-
[EnumMember]
20-
[OptionSetMetadata("Primary", 1033)]
21-
Primary = 3,
19+
[EnumMember]
20+
[OptionSetMetadata("Primary", 1033)]
21+
Primary = 3,
2222

23-
[EnumMember]
24-
[OptionSetMetadata("Other", 1033)]
25-
Other = 4,
23+
[EnumMember]
24+
[OptionSetMetadata("Other", 1033)]
25+
Other = 4,
2626
}

XrmPluginCore.Tests.Context/BusinessDomain/optionsets/account_address1_freighttermscode.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22

33
namespace XrmPluginCore.Tests.Context.BusinessDomain;
44

5-
[System.CodeDom.Compiler.GeneratedCode("DataverseProxyGenerator", "4.0.0.20")]
5+
[System.CodeDom.Compiler.GeneratedCode("DataverseProxyGenerator", "4.0.0.24")]
66
[DataContract]
77
#pragma warning disable CS8981
88
public enum account_address1_freighttermscode
99
#pragma warning restore CS8981
1010
{
11-
[EnumMember]
12-
[OptionSetMetadata("FOB", 1033)]
13-
FOB = 1,
11+
[EnumMember]
12+
[OptionSetMetadata("FOB", 1033)]
13+
FOB = 1,
1414

15-
[EnumMember]
16-
[OptionSetMetadata("No Charge", 1033)]
17-
NoCharge = 2,
15+
[EnumMember]
16+
[OptionSetMetadata("No Charge", 1033)]
17+
NoCharge = 2,
1818
}

0 commit comments

Comments
 (0)