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
1 parent 2314db1 commit e8d5dd9
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
1 change: 0 additions & 1 deletion Estimator/Estimator.Tests/Estimator.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

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

var creatRoom = new CreateRoom();
var creatRoom = new CreateRoom
{
Username = userName
};

creatRoom.Username = userName;

#endregion

Expand All @@ -26,7 +28,7 @@ public void IsParameterEmptyTest(string userName, bool isUsernameEmpty)

#region Assert

Assert.Equal(isUsernameEmpty, result);
Assert.Equal(isUsernameEmptyExpected, result);

#endregion
}
Expand All @@ -39,13 +41,13 @@ public void ConvertTypeTest(string type , int convertType)
{
#region Assign

var creatRoom = new CreateRoom();
var createRoom = new CreateRoom();

#endregion

#region Act

var result = creatRoom.ConvertType(type);
var result = createRoom.ConvertType(type);

#endregion

Expand Down
6 changes: 3 additions & 3 deletions Estimator/Estimator/Pages/CreateRoom.razor.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using Microsoft.AspNetCore.Components;
using Estimator.Data.Interface;
using Microsoft.AspNetCore.Components;
using Microsoft.JSInterop;
using System;
using System.Diagnostics;
using System.Runtime.CompilerServices;
using System.Threading.Tasks;
using Estimator.Data.Interface;

[assembly: InternalsVisibleTo("Estimator.Tests.Pages")]

Expand Down Expand Up @@ -46,7 +46,7 @@ private async void CreateNewRoom()

internal bool IsUsernameEmpty()
{
return this.Username == String.Empty;
return this.Username == string.Empty;
}

internal int ConvertType(string type)
Expand Down

0 comments on commit e8d5dd9

Please sign in to comment.