Преглед изворни кода

Merge pull request #16853 from Pilchie/TestUpdates

Update some tests
William Godbe пре 6 година
родитељ
комит
ec5ccaca22

+ 1 - 1
src/Components/test/testassets/BasicTestApp/ErrorComponent.razor

@@ -11,6 +11,6 @@
     void IncrementCount()
     void IncrementCount()
     {
     {
         currentCount++;
         currentCount++;
-        throw new NotImplementedException("Doing crazy things!");
+        throw new NotImplementedException("Doing something that won't work!");
     }
     }
 }
 }

+ 6 - 6
src/Features/JsonPatch/test/Internal/ObjectVisitorTest.cs

@@ -14,7 +14,7 @@ namespace Microsoft.AspNetCore.JsonPatch.Internal
         {
         {
             public string Name { get; set; }
             public string Name { get; set; }
             public IList<string> States { get; set; } = new List<string>();
             public IList<string> States { get; set; } = new List<string>();
-            public IDictionary<string, string> Countries = new Dictionary<string, string>();
+            public IDictionary<string, string> CountriesAndRegions = new Dictionary<string, string>();
             public dynamic Items { get; set; } = new ExpandoObject();
             public dynamic Items { get; set; } = new ExpandoObject();
         }
         }
 
 
@@ -62,14 +62,14 @@ namespace Microsoft.AspNetCore.JsonPatch.Internal
             get
             get
             {
             {
                 var model = new Class1();
                 var model = new Class1();
-                yield return new object[] { model, "/Countries/USA", model.Countries };
-                yield return new object[] { model.Countries, "/USA", model.Countries };
+                yield return new object[] { model, "/CountriesAndRegions/USA", model.CountriesAndRegions };
+                yield return new object[] { model.CountriesAndRegions, "/USA", model.CountriesAndRegions };
 
 
                 var nestedModel = new Class1Nested();
                 var nestedModel = new Class1Nested();
                 nestedModel.Customers.Add(new Class1());
                 nestedModel.Customers.Add(new Class1());
-                yield return new object[] { nestedModel, "/Customers/0/Countries/USA", nestedModel.Customers[0].Countries };
-                yield return new object[] { nestedModel.Customers, "/0/Countries/USA", nestedModel.Customers[0].Countries };
-                yield return new object[] { nestedModel.Customers[0], "/Countries/USA", nestedModel.Customers[0].Countries };
+                yield return new object[] { nestedModel, "/Customers/0/CountriesAndRegions/USA", nestedModel.Customers[0].CountriesAndRegions };
+                yield return new object[] { nestedModel.Customers, "/0/CountriesAndRegions/USA", nestedModel.Customers[0].CountriesAndRegions };
+                yield return new object[] { nestedModel.Customers[0], "/CountriesAndRegions/USA", nestedModel.Customers[0].CountriesAndRegions };
             }
             }
         }
         }