diff options
| 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 |
| commit | a64e1a9433a0d1ae340a38752f8b87cd7df8ad78 (patch) | |
| tree | 1f3acb3ff754d2f4a775fe935f80e584f9062c9e /src/Services/DevHive.Services.Tests/TechnologyServices.Tests.cs | |
| parent | e725d029bcd05f9c945312a3c931064a14d2bd5e (diff) | |
| download | DevHive-a64e1a9433a0d1ae340a38752f8b87cd7df8ad78.tar DevHive-a64e1a9433a0d1ae340a38752f8b87cd7df8ad78.tar.gz DevHive-a64e1a9433a0d1ae340a38752f8b87cd7df8ad78.zip | |
Replaced all "new Guid()" with "Guid.NewGuid()" in service tests
Diffstat (limited to 'src/Services/DevHive.Services.Tests/TechnologyServices.Tests.cs')
| -rw-r--r-- | src/Services/DevHive.Services.Tests/TechnologyServices.Tests.cs | 8 |
1 files changed, 4 insertions, 4 deletions
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<Guid>())).Returns(Task.FromResult<Technology>(null)); Exception ex = Assert.ThrowsAsync<ArgumentException>(() => 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<Guid>())).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<Guid>())).Returns(Task.FromResult(false)); |
