From 984d7f886053e64ba3dd9ca3f912809ca8cb433b Mon Sep 17 00:00:00 2001 From: Viktor Date: Thu, 5 Dec 2024 21:26:15 +0700 Subject: [PATCH] Update port field to int --- .../Data/DataSources/MicrosoftSqlServerDataSourceFixture.cs | 4 ++-- src/Reveal.Sdk.Dom.Tests/Data/HostDataSourceFixture.cs | 4 ++-- src/Reveal.Sdk.Dom/Data/HostDataSource.cs | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Reveal.Sdk.Dom.Tests/Data/DataSources/MicrosoftSqlServerDataSourceFixture.cs b/src/Reveal.Sdk.Dom.Tests/Data/DataSources/MicrosoftSqlServerDataSourceFixture.cs index 046c0727..9f79e04a 100644 --- a/src/Reveal.Sdk.Dom.Tests/Data/DataSources/MicrosoftSqlServerDataSourceFixture.cs +++ b/src/Reveal.Sdk.Dom.Tests/Data/DataSources/MicrosoftSqlServerDataSourceFixture.cs @@ -67,9 +67,9 @@ public void Host_SetsAndGetsValue_WithDifferentInputs(string host) } [Theory] - [InlineData("1234")] + [InlineData(3306)] [InlineData(null)] - public void Port_SetsAndGetsValue_WithDifferentInputs(string port) + public void Port_SetsAndGetsValue_WithDifferentInputs(int port) { // Arrange var dataSource = new MicrosoftSqlServerDataSource(); diff --git a/src/Reveal.Sdk.Dom.Tests/Data/HostDataSourceFixture.cs b/src/Reveal.Sdk.Dom.Tests/Data/HostDataSourceFixture.cs index fbfae166..859fea68 100644 --- a/src/Reveal.Sdk.Dom.Tests/Data/HostDataSourceFixture.cs +++ b/src/Reveal.Sdk.Dom.Tests/Data/HostDataSourceFixture.cs @@ -27,14 +27,14 @@ public void GetPort_ReturnSameValue_WithSetPort() { // Arrange var hostDataSource = new HostDataSource(); - var expectedPort = "8080"; + var expectedPort = 8080; // Act hostDataSource.Port = expectedPort; // Assert Assert.Equal(expectedPort, hostDataSource.Port); - Assert.Equal(expectedPort, hostDataSource.Properties.GetValue("Port")); + Assert.Equal(expectedPort, hostDataSource.Properties.GetValue("Port")); } } } diff --git a/src/Reveal.Sdk.Dom/Data/HostDataSource.cs b/src/Reveal.Sdk.Dom/Data/HostDataSource.cs index 6a0d6c6d..07cddb81 100644 --- a/src/Reveal.Sdk.Dom/Data/HostDataSource.cs +++ b/src/Reveal.Sdk.Dom/Data/HostDataSource.cs @@ -13,9 +13,9 @@ public string Host } [JsonIgnore] - public string Port + public int Port { - get => Properties.GetValue("Port"); + get => Properties.GetValue("Port"); set => Properties.SetItem("Port", value); } }