Website Summary Files Commits Branches @commit @diff @stats
path: root / src / Services / DevHive.Services.Tests / RoleService.Tests.cs
diff options
context:
space:
mode:
Commita64e1a9433a0d1ae340a38752f8b87cd7df8ad78 (patch)
Author
 Syndamia <kamen.d.mladenov@protonmail.com>
2021-03-13 16:14:42 +0200
Committer
 Syndamia <kamen.d.mladenov@protonmail.com>
2021-03-13 16:14:42 +0200
Files1f3acb3ff754d2f4a775fe935f80e584f9062c9e /src/Services/DevHive.Services.Tests/RoleService.Tests.cs
DevHive-a64e1a9433a0d1ae340a38752f8b87cd7df8ad78.tar
DevHive-a64e1a9433a0d1ae340a38752f8b87cd7df8ad78.tar.gz
DevHive-a64e1a9433a0d1ae340a38752f8b87cd7df8ad78.zip
Parente725d029bcd05f9c945312a3c931064a14d2bd5e (diff)
Replaced all "new Guid()" with "Guid.NewGuid()" in service tests
1 files changed, 4 insertions, 4 deletions
-rw-r--r--src/Services/DevHive.Services.Tests/RoleService.Tests.cs8
diff --git a/src/Services/DevHive.Services.Tests/RoleService.Tests.cs b/src/Services/DevHive.Services.Tests/RoleService.Tests.cs
index 29d5df2..f12ddc5 100644
--- a/src/Services/DevHive.Services.Tests/RoleService.Tests.cs
+++ b/src/Services/DevHive.Services.Tests/RoleService.Tests.cs
@@ -103,7 +103,7 @@ namespace DevHive.Services.Tests
[Test]
public async Task GetRoleById_ReturnsTheRole_WhenItExists()
{
- Guid id = new Guid();
+ Guid id = Guid.NewGuid();
string name = "Gosho Trapov";
Role role = new Role
{
@@ -126,7 +126,7 @@ namespace DevHive.Services.Tests
public void GetRoleById_ThrowsException_WhenRoleDoesNotExist()
{
string exceptionMessage = "Role does not exist!";
- Guid id = new Guid();
+ Guid id = Guid.NewGuid();
this.RoleRepositoryMock.Setup(p => p.GetByIdAsync(It.IsAny<Guid>())).Returns(Task.FromResult<Role>(null));
Exception ex = Assert.ThrowsAsync<ArgumentException>(() => this.RoleService.GetRoleById(id));
@@ -201,7 +201,7 @@ namespace DevHive.Services.Tests
[TestCase(false)]
public async Task DeleteRole_ShouldReturnIfDeletionIsSuccessfull_WhenRoleExists(bool shouldPass)
{
- Guid id = new Guid();
+ Guid id = Guid.NewGuid();
Role role = new Role();
this.RoleRepositoryMock.Setup(p => p.DoesRoleExist(It.IsAny<Guid>())).Returns(Task.FromResult(true));
@@ -217,7 +217,7 @@ namespace DevHive.Services.Tests
public void DeleteRole_ThrowsException_WhenRoleDoesNotExist()
{
string exceptionMessage = "Role does not exist!";
- Guid id = new Guid();
+ Guid id = Guid.NewGuid();
this.RoleRepositoryMock.Setup(p => p.DoesRoleExist(It.IsAny<Guid>())).Returns(Task.FromResult(false));