Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kasperk81 authored Jun 13, 2024
1 parent 648449c commit 87a9f87
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ public void WritesRequestExecutorBodyForCollection()
Assert.Contains("var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>", result);
Assert.Contains("{ \"4XX\", Error4XX.CreateFromDiscriminatorValue },", result);
Assert.Contains("SendCollectionAsync", result);
Assert.Contains("return collectionResult?.ToList()", result);
Assert.Contains("return collectionResult?.AsList()", result);
Assert.Contains($"{ReturnTypeName}.CreateFromDiscriminatorValue", result);
AssertExtensions.CurlyBracesAreClosed(result, 1);
}
Expand Down Expand Up @@ -592,7 +592,7 @@ public void WritesModelFactoryBodyForUnionModels()
Assert.Contains("ComplexType1Value = new ComplexType1()", result);
Assert.Contains("else if(parseNode.GetStringValue() is string stringValueValue)", result);
Assert.Contains("StringValue = stringValueValue", result);
Assert.Contains("parseNode.GetCollectionOfObjectValues<ComplexType2>(ComplexType2.CreateFromDiscriminatorValue)?.ToList() is List<ComplexType2> complexType2ValueValue", result);
Assert.Contains("parseNode.GetCollectionOfObjectValues<ComplexType2>(ComplexType2.CreateFromDiscriminatorValue)?.AsList() is List<ComplexType2> complexType2ValueValue", result);
Assert.Contains("ComplexType2Value = complexType2ValueValue", result);
Assert.Contains("return result", result);
AssertExtensions.Before("GetStringValue() is string stringValueValue", "GetCollectionOfObjectValues<ComplexType2>", result);
Expand Down Expand Up @@ -631,7 +631,7 @@ public void WritesModelFactoryBodyForIntersectionModels()
Assert.DoesNotContain("if(\"#kiota.complexType1\".Equals(mappingValue, StringComparison.OrdinalIgnoreCase))", result);
Assert.Contains("if(parseNode.GetStringValue() is string stringValueValue)", result);
Assert.Contains("StringValue = stringValueValue", result);
Assert.Contains("parseNode.GetCollectionOfObjectValues<ComplexType2>(ComplexType2.CreateFromDiscriminatorValue)?.ToList() is List<ComplexType2> complexType2ValueValue", result);
Assert.Contains("parseNode.GetCollectionOfObjectValues<ComplexType2>(ComplexType2.CreateFromDiscriminatorValue)?.AsList() is List<ComplexType2> complexType2ValueValue", result);
Assert.Contains("ComplexType2Value = complexType2ValueValue", result);
Assert.Contains("ComplexType1Value = new ComplexType1()", result);
Assert.Contains("return result", result);
Expand Down

0 comments on commit 87a9f87

Please sign in to comment.