diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CustomSerializationTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CustomSerializationTests.cs index 96f8d3b0ce..dc5d9b1654 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CustomSerializationTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CustomSerializationTests.cs @@ -330,7 +330,7 @@ public void TestStoredProcedure() client.EnsureValidClientAsync(NoOpTrace.Singleton).Wait(); - // Create a simple stored procedure + // Create a Simple stored procedure string scriptId = "bulkImportScript"; StoredProcedure sproc = new StoredProcedure { diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Fluent/ContainerSettingsTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Fluent/ContainerSettingsTests.cs index c7f32f6027..e7d516a681 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Fluent/ContainerSettingsTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Fluent/ContainerSettingsTests.cs @@ -949,7 +949,7 @@ ContainerResponse containerResponse Assert.IsNotNull(throughputProperties); Assert.AreEqual(expectedThroughput, throughputProperties.Throughput); - // simple API + // Simple API int? throughput = await container.ReadThroughputAsync(); Assert.IsNotNull(throughput); Assert.AreEqual(expectedThroughput, throughput); diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Linq/LinqGeneralBaselineTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Linq/LinqGeneralBaselineTests.cs index a5cdf0c837..c99543cb1d 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Linq/LinqGeneralBaselineTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Linq/LinqGeneralBaselineTests.cs @@ -674,7 +674,7 @@ public void TestSubquery() // Customer requested scenario inputs.Add(new LinqTestInput( - "Where(simple expr && Any)", b => getQuery(b) + "Where(Simple expr && Any)", b => getQuery(b) .Where(f => f.FamilyId.Contains("a") && f.Children.Any(c => c.Pets.Count() > 0)))); inputs.Add(new LinqTestInput( diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Linq/LinqSQLTranslationBaselineTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Linq/LinqSQLTranslationBaselineTests.cs index d38cede2b3..481b84401d 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Linq/LinqSQLTranslationBaselineTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Linq/LinqSQLTranslationBaselineTests.cs @@ -70,30 +70,30 @@ public async static Task CleanUp() cosmosClient?.Dispose(); } - struct simple + struct Simple { public int x; public int y; public string id; public string pk; - public simple(int x, int y) + public Simple(int x, int y) { this.x = x; this.y = y; this.id = Guid.NewGuid().ToString(); this.pk = "Test"; } } - struct nested + struct Nested { public int x; - public simple s; + public Simple s; - public nested(int x, simple s) + public Nested(int x, Simple s) { this.x = x; this.s = s; } } - struct complex + struct Complex { private string json; @@ -101,7 +101,7 @@ struct complex public string str; public bool b; public double[] dblArray; - public simple inside; + public Simple inside; public string id; public string pk; @@ -111,7 +111,7 @@ struct complex [System.Text.Json.Serialization.JsonExtensionData()] public Dictionary NetExtensionData { get; set; } - public complex(double d, string str, bool b, double[] da, simple s) + public Complex(double d, string str, bool b, double[] da, Simple s) { this.dbl = d; this.str = str; @@ -127,7 +127,7 @@ public complex(double d, string str, bool b, double[] da, simple s) public override string ToString() { - // simple cached serialization + // Simple cached serialization if (this.json == null) { this.json = JsonConvert.SerializeObject(this); @@ -137,7 +137,7 @@ public override string ToString() public override bool Equals(object obj) { - if (!(obj is complex)) return false; + if (!(obj is Complex)) return false; return this.ToString().Equals(obj.ToString()); } @@ -207,16 +207,16 @@ public void ValidateSQLTranslation() float floatValue = 5.23f; const int Records = 100; - Func createDataObj = (random) => + Func createDataObj = (random) => { - simple obj = new simple(); + Simple obj = new Simple(); obj.x = random.Next(); obj.y = random.Next(); obj.id = Guid.NewGuid().ToString(); obj.pk = "Test"; return obj; }; - Func> dataQuery = LinqTestsCommon.GenerateTestCosmosData(createDataObj, Records, testContainer); + Func> dataQuery = LinqTestsCommon.GenerateTestCosmosData(createDataObj, Records, testContainer); List inputs = new List(); inputs.Add(new LinqTestInput("Select cast float", b => dataQuery(b).Select(x => (int)floatValue))); @@ -225,7 +225,7 @@ public void ValidateSQLTranslation() inputs.Add(new LinqTestInput("Select int expr w const", b => dataQuery(b).Select(x => x.x + constInt))); inputs.Add(new LinqTestInput("Select w new array", b => dataQuery(b).Select(d => new int[2] { d.x, d.x + 1 }))); inputs.Add(new LinqTestInput("Select new", b => dataQuery(b).Select(d => new { first = d.x, second = d.x }))); - inputs.Add(new LinqTestInput("Select nested new", b => dataQuery(b).Select(d => new { first = d.x, second = new { third = d.x } }))); + inputs.Add(new LinqTestInput("Select Nested new", b => dataQuery(b).Select(d => new { first = d.x, second = new { third = d.x } }))); inputs.Add(new LinqTestInput("Filter int >", b => dataQuery(b).Where(x => x.x > 2))); inputs.Add(new LinqTestInput("Filter method >", b => dataQuery(b).Where(x => x.x > id(3)))); inputs.Add(new LinqTestInput("Filter int > -> Select int expr", b => dataQuery(b).Where(x => x.x > 2).Select(x => x.x + 2))); @@ -236,9 +236,9 @@ public void ValidateSQLTranslation() inputs.Add(new LinqTestInput("Select const array index", b => dataQuery(b) .Where(x => x.x >= 0 && x.x < 3) .Select(x => new int[] { 1, 2, 3 }[x.x]))); - inputs.Add(new LinqTestInput("Select new simple", b => dataQuery(b).Select(x => new simple { x = x.x, y = x.x }))); - inputs.Add(new LinqTestInput("Select new nested", b => dataQuery(b).Select(x => new nested { s = new simple { x = x.x, y = x.x }, x = 2 }))); - inputs.Add(new LinqTestInput("Select new complex", b => dataQuery(b).Select(d => new complex { dbl = 1.0, str = "", b = false, dblArray = new double[] { 1.0, 2.0, }, inside = new simple { x = d.x, y = d.x } }))); + inputs.Add(new LinqTestInput("Select new Simple", b => dataQuery(b).Select(x => new Simple { x = x.x, y = x.x }))); + inputs.Add(new LinqTestInput("Select new Nested", b => dataQuery(b).Select(x => new Nested { s = new Simple { x = x.x, y = x.x }, x = 2 }))); + inputs.Add(new LinqTestInput("Select new Complex", b => dataQuery(b).Select(d => new Complex { dbl = 1.0, str = "", b = false, dblArray = new double[] { 1.0, 2.0, }, inside = new Simple { x = d.x, y = d.x } }))); inputs.Add(new LinqTestInput("Select cast double x", b => dataQuery(b).Select(x => (double)x.x))); inputs.Add(new LinqTestInput("Select indexer x", b => dataQuery(b) .Where(x => x.x >= 0 && x.x < array.Length) @@ -246,8 +246,8 @@ public void ValidateSQLTranslation() inputs.Add(new LinqTestInput("Select new constructor", b => dataQuery(b).Select(x => new TimeSpan(x.x)))); inputs.Add(new LinqTestInput("Select method id", b => dataQuery(b).Select(x => id(x)))); inputs.Add(new LinqTestInput("Select identity", b => dataQuery(b).Select(x => x))); - inputs.Add(new LinqTestInput("Select simple property", b => dataQuery(b).Select(x => x.x))); - inputs.Add(new LinqTestInput("Select extension data", b => dataQuery(b).Select(x => new complex() { + inputs.Add(new LinqTestInput("Select Simple property", b => dataQuery(b).Select(x => x.x))); + inputs.Add(new LinqTestInput("Select extension data", b => dataQuery(b).Select(x => new Complex() { NewtonsoftExtensionData = new() { { "test", 1.5 } }, @@ -268,9 +268,9 @@ public void ValidateSQLTranslationComplexData() const int Records = 100; const int MaxArraySize = 10; const int MaxStringLength = 50; - Func createDataObj = (random) => + Func createDataObj = (random) => { - complex obj = new complex(); + Complex obj = new Complex(); obj.b = random.NextDouble() < 0.5; obj.dbl = random.NextDouble(); obj.dblArray = new double[random.Next(MaxArraySize)]; @@ -278,7 +278,7 @@ public void ValidateSQLTranslationComplexData() { obj.dblArray[i] = random.NextDouble() < 0.1 ? 3 : random.NextDouble(); } - obj.inside = new simple() { x = random.Next(), y = random.Next() }; + obj.inside = new Simple() { x = random.Next(), y = random.Next() }; obj.str = random.NextDouble() < 0.1 ? "5" : LinqTestsCommon.RandomString(random, random.Next(MaxStringLength)); obj.id = Guid.NewGuid().ToString(); obj.pk = "Test"; @@ -288,7 +288,7 @@ public void ValidateSQLTranslationComplexData() }; return obj; }; - Func> getQuery = LinqTestsCommon.GenerateTestCosmosData(createDataObj, Records, testContainer); + Func> getQuery = LinqTestsCommon.GenerateTestCosmosData(createDataObj, Records, testContainer); List inputs = new List(); inputs.Add(new LinqTestInput("Select equality", b => getQuery(b).Select(s => s.str == "5"))); diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Linq/LinqScalarFunctionBaselineTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Linq/LinqScalarFunctionBaselineTests.cs index 96d06b829a..9548680f54 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Linq/LinqScalarFunctionBaselineTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Linq/LinqScalarFunctionBaselineTests.cs @@ -156,7 +156,7 @@ public void TestFirstOrDefault() ///////////////// // ISSUE-TODO-adityasa-2024/1/26 - Support FirstOrDefault overloads. - // Please note, this requires potential support for user code invocation in context of rest of the client code (except maybe some simple cases). + // Please note, this requires potential support for user code invocation in context of rest of the client code (except maybe some Simple cases). // We do not currently do this for any other scenarios. // Unsupported diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Linq/LinqTestsCommon.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Linq/LinqTestsCommon.cs index 18f1e12fa0..9d36adb247 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Linq/LinqTestsCommon.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Linq/LinqTestsCommon.cs @@ -636,7 +636,7 @@ protected virtual string SerializeForTestBaseline() public override string ToString() { - // simple cached serialization + // Simple cached serialization this.json ??= this.SerializeForTestBaseline(); return this.json; } diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Linq/LinqTranslationBaselineTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Linq/LinqTranslationBaselineTests.cs index b1faf73c28..6f23487d67 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Linq/LinqTranslationBaselineTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Linq/LinqTranslationBaselineTests.cs @@ -1442,7 +1442,7 @@ public void TestArrayContainsAll() 10.123456789d, new object[] { "world", - new object[] { "nested array", new { A = int.MaxValue, B = int.MinValue } } })).Select(doc => doc.ArrayField), + new object[] { "Nested array", new { A = int.MaxValue, B = int.MinValue } } })).Select(doc => doc.ArrayField), skipVerification: true, serializeOutput: true), new LinqTestInput("same field", @@ -1458,7 +1458,7 @@ public void TestArrayContainsAll() 10.123456789d, new object[] { "world", - new object[] { "nested array", new { A = int.MaxValue, B = int.MinValue } } } + new object[] { "Nested array", new { A = int.MaxValue, B = int.MinValue } } } }.ArrayContainsAll(doc.ArrayField)).Select(doc => doc.ArrayField), skipVerification: true, serializeOutput: true), @@ -1588,7 +1588,7 @@ public void TestArrayContainsAny() 10.123456789d, new object[] { "world", - new object[] { "nested array", new { A = int.MaxValue, B = int.MinValue } } })).Select(doc => doc.ArrayField), + new object[] { "Nested array", new { A = int.MaxValue, B = int.MinValue } } })).Select(doc => doc.ArrayField), skipVerification: true, serializeOutput: true), new LinqTestInput("same field", @@ -1604,7 +1604,7 @@ public void TestArrayContainsAny() 10.123456789d, new object[] { "world", - new object[] { "nested array", new { A = int.MaxValue, B = int.MinValue } } } + new object[] { "Nested array", new { A = int.MaxValue, B = int.MinValue } } } }.ArrayContainsAny(doc.ArrayField)).Select(doc => doc.ArrayField), skipVerification: true, serializeOutput: true), diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Microsoft.Azure.Cosmos.EmulatorTests.csproj b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Microsoft.Azure.Cosmos.EmulatorTests.csproj index 9fbf6386ae..995316ec27 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Microsoft.Azure.Cosmos.EmulatorTests.csproj +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Microsoft.Azure.Cosmos.EmulatorTests.csproj @@ -54,12 +54,9 @@ - - - @@ -67,7 +64,6 @@ - diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/ConflictsE2ETest.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/ConflictsE2ETest.cs index 0edd95b22d..ecf0c9c4db 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/ConflictsE2ETest.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/ConflictsE2ETest.cs @@ -125,7 +125,7 @@ private async Task InsertWithoutConflict(IReadOnlyList<(CosmosClient Client, Con /// /// Insert documents until exactly one conflict is generated. /// This is a non-deterministic operation (in terms of both duration and outcome) due to backend's behavior. - /// It will terminate the test based on simple heuristic if desired outcome cannot be achieved. + /// It will terminate the test based on Simple heuristic if desired outcome cannot be achieved. /// private async Task InsertWithConflict(IReadOnlyList<(CosmosClient Client, Container Container)> cosmosContainers) => await this.InsertFromMultipleClients( diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/QueryTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/QueryTests.cs index 758a7bec04..15ca6a3aba 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/QueryTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/QueryTests.cs @@ -849,7 +849,7 @@ private async Task TestQueryUnicodeDocument(bool useGateway, Protocol protocol) } }; - await testDocumentSQL("doc00", "simple", null); + await testDocumentSQL("doc00", "Simple", null); await testDocumentSQL("doc10", "\uD83D\uDE03", @"\uD83D\uDE03"); await testDocumentSQL("doc20", "\uD83D\uDE03\t\u0005\uD83D\uDE03", @"\uD83D\uDE03\t\u0005\uD83D\uDE03"); await testDocumentSQL("doc30", "Små ord", null); @@ -2224,7 +2224,7 @@ await TestCommon.AsyncRetryRateLimiting(async () => }); } - // simple validations - existence - yes & no + // Simple validations - existence - yes & no DocumentFeedResponse result = await this.client.CreateDocumentQuery(collection, "SELECT r.id FROM root r", new FeedOptions() { EnableCrossPartitionQuery = true }).AsDocumentQuery().ExecuteNextAsync(); Assert.IsNull(result.ResponseHeaders[WFConstants.BackendHeaders.QueryMetrics], "Expected no metrics headers for query"); Assert.IsNull(result.ResponseHeaders[WFConstants.BackendHeaders.IndexUtilization], "Expected no index utilization headers for query");