Skip to content

Commit

Permalink
Merge branch 'main' into unit-test/rest
Browse files Browse the repository at this point in the history
  • Loading branch information
recca5p authored Dec 6, 2024
2 parents d0378f7 + a6a9d36 commit be195b7
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 be195b7

Please sign in to comment.