From 8c12d239ad0fb98e2a68c72665bea864043c87a0 Mon Sep 17 00:00:00 2001 From: Phat Vo Date: Wed, 11 Dec 2024 09:53:43 +0700 Subject: [PATCH] fix the UTs --- .../MySqlDataSourceItemFixture.cs | 24 +++++++------- .../DataSources/MySQLDataSourceFixture.cs | 33 ++++++++++--------- 2 files changed, 31 insertions(+), 26 deletions(-) diff --git a/src/Reveal.Sdk.Dom.Tests/Data/DataSourceItems/MySqlDataSourceItemFixture.cs b/src/Reveal.Sdk.Dom.Tests/Data/DataSourceItems/MySqlDataSourceItemFixture.cs index 4a3b0ad4..d49f00e4 100644 --- a/src/Reveal.Sdk.Dom.Tests/Data/DataSourceItems/MySqlDataSourceItemFixture.cs +++ b/src/Reveal.Sdk.Dom.Tests/Data/DataSourceItems/MySqlDataSourceItemFixture.cs @@ -66,17 +66,19 @@ public void RDashDocument_HasCorrectDataSourceItem_WhenLoadFromFile() public void ToJsonString_CreatesFormattedJson_ForMySQLDataSource() { // Arrange - var expectedJson = @" - { - ""_type"": ""DataSourceItemType"", - ""Id"": ""mySqlItemId"", - ""Title"": ""MySQL DS Item"", - ""DataSourceId"": ""mySqlId"", - ""HasTabularData"": true, - ""HasAsset"": false, - ""Properties"": {}, - ""Parameters"": {} - }"; + var expectedJson = + """ + { + "_type": "DataSourceItemType", + "Id": "mySqlItemId", + "Title": "MySQL DS Item", + "DataSourceId": "mySqlId", + "HasTabularData": true, + "HasAsset": false, + "Properties": {}, + "Parameters": {} + } + """; var dataSource = new MySQLDataSource() { diff --git a/src/Reveal.Sdk.Dom.Tests/Data/DataSources/MySQLDataSourceFixture.cs b/src/Reveal.Sdk.Dom.Tests/Data/DataSources/MySQLDataSourceFixture.cs index 7b08d6a5..8771ced7 100644 --- a/src/Reveal.Sdk.Dom.Tests/Data/DataSources/MySQLDataSourceFixture.cs +++ b/src/Reveal.Sdk.Dom.Tests/Data/DataSources/MySQLDataSourceFixture.cs @@ -54,22 +54,25 @@ public void RDashDocument_HasCorrectDataSource_WhenLoadFromFile() public void ToJsonString_CreatesFormattedJson_ForMySQLDataSource() { // Arrange - var expectedJson = @" - { - ""_type"": ""DataSourceType"", - ""Id"": ""mySqlId"", - ""Provider"": ""MYSQL"", - ""Description"": ""MySQL DS"", - ""DefaultRefreshRate"": ""120"", - ""Properties"": { - ""ServerAggregationDefault"": true, - ""ServerAggregationReadOnly"": false, - ""Host"": ""mysqlserver.local"", - ""Port"": ""3306"", - ""Database"": ""northwind"", - ""DefaultRefreshRate"": ""120"" + var expectedJson = + """ + { + "_type": "DataSourceType", + "Id": "mySqlId", + "Provider": "MYSQL", + "Description": "MySQL DS", + "Properties": { + "ServerAggregationDefault": true, + "ServerAggregationReadOnly": false, + "Host": "mysqlserver.local", + "Port": 3306, + "Database": "northwind" + }, + "Settings": { + "DefaultRefreshRate": "120" } - }"; + } + """; var dataSource = new MySQLDataSource() {