Merge pull request #16853 from Pilchie/TestUpdates

Update some tests
This commit is contained in:
William Godbe 2019-11-11 09:44:54 -08:00 committed by GitHub
commit ec5ccaca22
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 7 deletions

View File

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

View File

@ -14,7 +14,7 @@ namespace Microsoft.AspNetCore.JsonPatch.Internal
{
public string Name { get; set; }
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();
}
@ -62,14 +62,14 @@ namespace Microsoft.AspNetCore.JsonPatch.Internal
get
{
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();
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 };
}
}