Skip to content

Commit

Permalink
Merge pull request #130 from RevealBi/refactor/update-fields
Browse files Browse the repository at this point in the history
Update port field to int
  • Loading branch information
hainv-ohio authored Dec 5, 2024
2 parents e58b37b + 984d7f8 commit a6a9d36
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
4 changes: 2 additions & 2 deletions src/Reveal.Sdk.Dom.Tests/Data/HostDataSourceFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<string>("Port"));
Assert.Equal(expectedPort, hostDataSource.Properties.GetValue<int>("Port"));
}
}
}
4 changes: 2 additions & 2 deletions src/Reveal.Sdk.Dom/Data/HostDataSource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ public string Host
}

[JsonIgnore]
public string Port
public int Port
{
get => Properties.GetValue<string>("Port");
get => Properties.GetValue<int>("Port");
set => Properties.SetItem("Port", value);
}
}
Expand Down

0 comments on commit a6a9d36

Please sign in to comment.