Skip to content

Commit

Permalink
#74
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiasMeissner2000 committed Nov 9, 2021
2 parents e8d5dd9 + 6b1ff90 commit 8f1b47f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Estimator/Estimator.Tests/Estimator.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.11.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<PrivateAssets>all</PrivateAssets>
Expand Down
3 changes: 1 addition & 2 deletions Estimator/Estimator.Tests/Pages/CreateRoomTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public class CreateRoomTests
[Theory]
[InlineData("Max Mustermann", false)]
[InlineData("", true)]
public void IsUsernameEmptyTest(string userName, bool isUsernameEmptyExpected)
public void IsUsernameEmptyTest(string userName, bool isUsernameEmpty)
{
#region Assign

Expand All @@ -17,7 +17,6 @@ public void IsUsernameEmptyTest(string userName, bool isUsernameEmptyExpected)
Username = userName
};


#endregion

#region Act
Expand Down
6 changes: 3 additions & 3 deletions Estimator/Estimator.Tests/Pages/JoinRoomTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public class JoinRoomTests
[InlineData("12345", "Max Mustermann", false)]
[InlineData("", "", true)]
[InlineData("123456", "", true)]
public void IsParameterEmptyTest(string roomId, string userName, bool isParameterEmpty)
public void IsUsernameOrRoomIdEmptyTest(string roomId, string userName, bool isUsernameOrRoomIdEmpty)
{
#region Assign

Expand All @@ -24,13 +24,13 @@ public void IsParameterEmptyTest(string roomId, string userName, bool isParamete

#region Act

var result = joinRoom.IsParameterEmpty();
var result = joinRoom.IsUsernameOrRoomIdEmpty();

#endregion

#region Assert

Assert.Equal(isParameterEmpty, result);
Assert.Equal(isUsernameOrRoomIdEmpty, result);

#endregion
}
Expand Down
4 changes: 2 additions & 2 deletions Estimator/Estimator/Pages/JoinRoom.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public partial class JoinRoom
private async void JoinRoomById()
{

if(this.IsParameterEmpty())
if(this.IsUsernameOrRoomIdEmpty())
{
await Alert("Username or RoomId is empty!");
return;
Expand All @@ -41,7 +41,7 @@ private async void JoinRoomById()
await this.Alert("Something went wrong!");
}
}
internal bool IsParameterEmpty()
internal bool IsUsernameOrRoomIdEmpty()
{
return this.Username.Equals(string.Empty) || this.RoomId.Equals(string.Empty);
}
Expand Down

0 comments on commit 8f1b47f

Please sign in to comment.