You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Disambiguate complex type, better method overload support (#227)
* Update ComplexType.cs.tt to disambiguate
Related to updates to EntityType.cs.tt in 9850b83 and 29d268b
* Disambiguate parameters for actions
* Enable overloads with uniqueness checks
Fixes a hack that was used to restrict generation of a function overload where the overload was based on the binding element type. We now check the overloads for uniqueness based on the parameter list. We also now don't emit duplicate parameters in the CreateReqyest method.
* Structural property type needs to use the same disambiguation scheme as complextype template
Copy file name to clipboardExpand all lines: test/Typewriter.Test/Given_a_valid_metadata_file_to_Typewriter.cs
+188Lines changed: 188 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -280,5 +280,193 @@ public void It_doesnt_generate_odatatype_initialization_for_abstract_entitytypes
280
280
Assert.IsTrue(hasTestString,$"The expected test token string, '{testString}', was not set in the generated test file. We didn't properly generate the cstor code.");
281
281
Assert.IsFalse(hasTestODataInitString,$"The unexpected test token string, '{testODataInitString}', was set in the generated test file. We didn't properly generate the cstor code.");
stringtestString="public abstract partial class EmptyBaseComplexTypeRequestObject";
304
+
305
+
foreach(varlineinlines)
306
+
{
307
+
if(line.Contains(testString))
308
+
{
309
+
hasTestString=true;
310
+
break;
311
+
}
312
+
}
313
+
314
+
Assert.IsTrue(hasTestString,$"The expected test token string, '{testString}', was not set in the generated test file. We didn't properly generate the type declaration code.");
Assert.IsTrue(hasTestTypeDeclaration,$"The expected test token string, '{testTypeDeclaration}', was not set in the generated test file. We didn't properly generate the type declaration code.");
363
+
Assert.IsTrue(hasTestTypeCstor,$"The expected test token string, '{testTypeCstor}', was not set in the generated test file. We didn't properly generate the cstor code.");
364
+
Assert.IsTrue(hasTestOdataType,$"The expected test token string, '{testOdataType}', was not set in the generated test file. We didn't properly generate the initialized odata.type code.");
Assert.IsTrue(hasTestParameter,$"The expected test token string, '{testParameter}', was not set in the generated test file. We didn't properly generate the parameter.");
Assert.IsTrue(hasTestParameter,$"The expected test token string, '{testParameter}', was not set in the generated test file. We didn't properly generate the parameter.");
Assert.IsTrue(hasTestParameter,$"The expected test token string, '{testParameter}', was not set in the generated test file. We didn't properly generate the parameter.");
0 commit comments