Skip to content

Commit

Permalink
fix the UTs
Browse files Browse the repository at this point in the history
  • Loading branch information
recca5p committed Dec 11, 2024
1 parent a51556e commit 8c12d23
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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()
{
Expand Down
33 changes: 18 additions & 15 deletions src/Reveal.Sdk.Dom.Tests/Data/DataSources/MySQLDataSourceFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
{
Expand Down

0 comments on commit 8c12d23

Please sign in to comment.