-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
108 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,60 @@ | ||
namespace Estimator.Tests.Pages | ||
using Estimator.Pages; | ||
using Xunit; | ||
|
||
namespace Estimator.Tests.Pages | ||
{ | ||
public class CreateRoomTests | ||
{ | ||
[Theory] | ||
[InlineData("Max Mustermann", false)] | ||
[InlineData("", true)] | ||
public void IsParameterEmptyTest(string userName, bool isUsernameEmpty) | ||
{ | ||
#region Assign | ||
|
||
var creatRoom = new CreateRoom(); | ||
|
||
creatRoom.Username = userName; | ||
|
||
#endregion | ||
|
||
#region Act | ||
|
||
var result = creatRoom.IsUsernameEmpty(); | ||
|
||
#endregion | ||
|
||
#region Assert | ||
|
||
Assert.Equal(isUsernameEmpty, result); | ||
|
||
#endregion | ||
} | ||
|
||
[Theory] | ||
[InlineData("Fibonacci", 1)] | ||
[InlineData("T-Shirt", 2)] | ||
[InlineData("Test", 2)] | ||
public void ConvertTypeTest(string type , int convertType) | ||
{ | ||
#region Assign | ||
|
||
var creatRoom = new CreateRoom(); | ||
|
||
#endregion | ||
|
||
#region Act | ||
|
||
var result = creatRoom.ConvertType(type); | ||
|
||
#endregion | ||
|
||
#region Assert | ||
|
||
Assert.Equal(convertType, result); | ||
|
||
#endregion | ||
} | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,38 @@ | ||
namespace Estimator.Tests.Pages | ||
using System; | ||
using Estimator.Data; | ||
using Estimator.Pages; | ||
using Xunit; | ||
|
||
namespace Estimator.Tests.Pages | ||
{ | ||
public class JoinRoomTests | ||
{ | ||
[Theory] | ||
[InlineData("12345", "Max Mustermann", false)] | ||
[InlineData("", "", true)] | ||
[InlineData("123456", "", true)] | ||
public void IsParameterEmptyTest(string roomId, string userName, bool isParameterEmpty) | ||
{ | ||
#region Assign | ||
|
||
var joinRoom = new JoinRoom(); | ||
|
||
joinRoom.RoomId = roomId; | ||
joinRoom.Username = userName; | ||
|
||
#endregion | ||
|
||
#region Act | ||
|
||
var result = joinRoom.IsParameterEmpty(); | ||
|
||
#endregion | ||
|
||
#region Assert | ||
|
||
Assert.Equal(isParameterEmpty, result); | ||
|
||
#endregion | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters