Skip to content

Commit

Permalink
Merge branch 'unit-test/rest' of https://github.com/RevealBi/Reveal.S…
Browse files Browse the repository at this point in the history
…dk.Dom into unit-test/rest
  • Loading branch information
recca5p committed Dec 9, 2024
2 parents d6d4a58 + be195b7 commit f4e8ca4
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 f4e8ca4

Please sign in to comment.