Skip to content

Commit

Permalink
Fix failed unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vulh-infragistics committed Dec 11, 2024
1 parent fe2408a commit 12b0452
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,7 @@ public void ToJsonString_CreateExpectedRevealJson_NoConditions()
HasAsset = false,
ProcessDataOnServer = true,
Database = "reveal",
Table = "Categories"
//DefaultRefreshRate = "161" // TODO: Check the DefaultRefreshRate when get Json, after DefaultRefreshRate is moved to Settings field
Table = "Categories",
};

// Act
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,24 +36,28 @@ public void GetTrustServerCertificate_ReturnSameValue_WhenSet()
public void ToJsonString_CreateExpectedRevealJson_NoConditions()
{
// Arrange
var expectedJson = @"{
""_type"": ""DataSourceType"",
""Id"": ""azureSqlId"",
""Provider"": ""AZURE_SQL"",
""Description"": ""Azure SQL DS"",
""Subtitle"": ""Azure SQL DS Item"",
""Properties"": {
""ServerAggregationDefault"": false,
""ServerAggregationReadOnly"": true,
""Host"": ""revealtesting.database.windows.net"",
""Port"": 1433,
""Database"": ""reveal"",
""Schema"": ""azureSchema"",
""TrustServerCertificate"": false,
""Encrypt"": false
var expectedJson = """
{
"_type": "DataSourceType",
"Id": "azureSqlId",
"Provider": "AZURE_SQL",
"Description": "Azure SQL DS",
"Subtitle": "Azure SQL DS Item",
"Properties": {
"ServerAggregationDefault": false,
"ServerAggregationReadOnly": true,
"Host": "revealtesting.database.windows.net",
"Port": 1433,
"Database": "reveal",
"Schema": "azureSchema",
"TrustServerCertificate": false,
"Encrypt": false
},
}";
"Settings": {
"DefaultRefreshRate": 180
}
}
""";
var dataSource = new MicrosoftAzureSqlServerDataSource()
{
Id = "azureSqlId",
Expand All @@ -67,7 +71,7 @@ public void ToJsonString_CreateExpectedRevealJson_NoConditions()
Schema = "azureSchema",
TrustServerCertificate = false,
Encrypt = false,
//DefaultRefreshRate = "161" // TODO: Check the DefaultRefreshRate when get Json, after DefaultRefreshRate is moved to Settings field
DefaultRefreshRate = "180"
};

// Act
Expand All @@ -79,5 +83,4 @@ public void ToJsonString_CreateExpectedRevealJson_NoConditions()
Assert.Equal(expectedJObject, actualJObject);
}
}
}

}

0 comments on commit 12b0452

Please sign in to comment.