Esempio n. 1
0
        public void FindItemsWhereContainsShouldConstructValidSqlQuery()
        {
            // Arrange
            string query = @"SELECT * FROM c WHERE CONTAINS(c.Name, 'EVICTION')";

            // Act
            var result = dynamicQueries.FindItemsWhereContainsAsync("TopicsCollections", "Name", "EVICTION").Result;

            // Assert
            cosmosDbService.Received().QueryItemsAsync(Arg.Any <string>(), query);
        }
Esempio n. 2
0
        public void FindItemsWhereContainsShouldAlwaysSendUpperCasePropertyValuesToCosmos()
        {
            // Arrange
            string query = @"SELECT * FROM c WHERE CONTAINS(c.Name, 'EVICTION')";

            // Act
            var result = dynamicQueries.FindItemsWhereContainsAsync("TopicsCollections", "Name", "EvicTION").Result;

            // Assert
            cosmosDbService.Received().QueryItemsAsync(Arg.Any <string>(), query);
        }