From a64e1a9433a0d1ae340a38752f8b87cd7df8ad78 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Sat, 13 Mar 2021 16:14:42 +0200 Subject: Replaced all "new Guid()" with "Guid.NewGuid()" in service tests --- src/Services/DevHive.Services.Tests/TechnologyServices.Tests.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/Services/DevHive.Services.Tests/TechnologyServices.Tests.cs') diff --git a/src/Services/DevHive.Services.Tests/TechnologyServices.Tests.cs b/src/Services/DevHive.Services.Tests/TechnologyServices.Tests.cs index a43d4b9..b53fc03 100644 --- a/src/Services/DevHive.Services.Tests/TechnologyServices.Tests.cs +++ b/src/Services/DevHive.Services.Tests/TechnologyServices.Tests.cs @@ -104,7 +104,7 @@ namespace DevHive.Services.Tests [Test] public async Task GetTechnologyById_ReturnsTheTechnology_WhenItExists() { - Guid id = new Guid(); + Guid id = Guid.NewGuid(); string name = "Gosho Trapov"; Technology technology = new() { @@ -127,7 +127,7 @@ namespace DevHive.Services.Tests public void GetTechnologyById_ThrowsException_WhenTechnologyDoesNotExist() { string exceptionMessage = "The technology does not exist"; - Guid id = new Guid(); + Guid id = Guid.NewGuid(); this.TechnologyRepositoryMock.Setup(p => p.GetByIdAsync(It.IsAny())).Returns(Task.FromResult(null)); Exception ex = Assert.ThrowsAsync(() => this.TechnologyService.GetTechnologyById(id)); @@ -233,7 +233,7 @@ namespace DevHive.Services.Tests [TestCase(false)] public async Task DeleteTechnology_ShouldReturnIfDeletionIsSuccessfull_WhenTechnologyExists(bool shouldPass) { - Guid id = new Guid(); + Guid id = Guid.NewGuid(); Technology technology = new Technology(); this.TechnologyRepositoryMock.Setup(p => p.DoesTechnologyExistAsync(It.IsAny())).Returns(Task.FromResult(true)); @@ -249,7 +249,7 @@ namespace DevHive.Services.Tests public void DeleteTechnology_ThrowsException_WhenTechnologyDoesNotExist() { string exceptionMessage = "Technology does not exist!"; - Guid id = new Guid(); + Guid id = Guid.NewGuid(); this.TechnologyRepositoryMock.Setup(p => p.DoesTechnologyExistAsync(It.IsAny())).Returns(Task.FromResult(false)); -- cgit v1.2.3