aboutsummaryrefslogtreecommitdiff
path: root/src/DevHive.Tests
diff options
context:
space:
mode:
authortranstrike <transtrike@gmail.com>2021-01-12 20:45:14 +0200
committertranstrike <transtrike@gmail.com>2021-01-12 20:45:14 +0200
commit56f5578d5f93a56984deb6735dba51551868f6d8 (patch)
tree5f309ba5a79882ad41ed78bf7ae8f18f38be757e /src/DevHive.Tests
parentd2a754aa220f37ac28393451e7ad5793687bb999 (diff)
downloadDevHive-56f5578d5f93a56984deb6735dba51551868f6d8.tar
DevHive-56f5578d5f93a56984deb6735dba51551868f6d8.tar.gz
DevHive-56f5578d5f93a56984deb6735dba51551868f6d8.zip
Full implementation of Language & Technologies to User
Diffstat (limited to 'src/DevHive.Tests')
-rw-r--r--src/DevHive.Tests/DevHive.Data.Tests/TechnologyRepository.Tests.cs10
-rw-r--r--src/DevHive.Tests/DevHive.Services.Tests/TechnologyService.Tests.cs10
2 files changed, 10 insertions, 10 deletions
diff --git a/src/DevHive.Tests/DevHive.Data.Tests/TechnologyRepository.Tests.cs b/src/DevHive.Tests/DevHive.Data.Tests/TechnologyRepository.Tests.cs
index beac798..54cf7c0 100644
--- a/src/DevHive.Tests/DevHive.Data.Tests/TechnologyRepository.Tests.cs
+++ b/src/DevHive.Tests/DevHive.Data.Tests/TechnologyRepository.Tests.cs
@@ -76,7 +76,7 @@ namespace DevHive.Data.Tests
}
#endregion
- #region DoesTechnologyExist
+ #region DoesTechnologyExistAsync
[Test]
public void DoesTechnologyExist_ReturnsTrue_IfIdExists()
{
@@ -86,9 +86,9 @@ namespace DevHive.Data.Tests
Technology technology = this.Context.Technologies.Where(x => x.Name == TECHNOLOGY_NAME).ToList().FirstOrDefault();
Guid id = technology.Id;
- bool result = await this.TechnologyRepository.DoesTechnologyExist(id);
+ bool result = await this.TechnologyRepository.DoesTechnologyExistAsync(id);
- Assert.IsTrue(result, "DoesTechnologyExist returns flase hwen technology exists");
+ Assert.IsTrue(result, "DoesTechnologyExistAsync returns flase hwen technology exists");
}).GetAwaiter().GetResult();
}
@@ -99,9 +99,9 @@ namespace DevHive.Data.Tests
{
Guid id = new Guid();
- bool result = await this.TechnologyRepository.DoesTechnologyExist(id);
+ bool result = await this.TechnologyRepository.DoesTechnologyExistAsync(id);
- Assert.IsFalse(result, "DoesTechnologyExist returns true when technology does not exist");
+ Assert.IsFalse(result, "DoesTechnologyExistAsync returns true when technology does not exist");
}).GetAwaiter().GetResult();
}
#endregion
diff --git a/src/DevHive.Tests/DevHive.Services.Tests/TechnologyService.Tests.cs b/src/DevHive.Tests/DevHive.Services.Tests/TechnologyService.Tests.cs
index 3e26201..acb5e64 100644
--- a/src/DevHive.Tests/DevHive.Services.Tests/TechnologyService.Tests.cs
+++ b/src/DevHive.Tests/DevHive.Services.Tests/TechnologyService.Tests.cs
@@ -157,7 +157,7 @@ namespace DevHive.Services.Tests
Id = id
};
- this.TechnologyRepositoryMock.Setup(p => p.DoesTechnologyExist(It.IsAny<Guid>())).Returns(Task.FromResult(true));
+ this.TechnologyRepositoryMock.Setup(p => p.DoesTechnologyExistAsync(It.IsAny<Guid>())).Returns(Task.FromResult(true));
this.TechnologyRepositoryMock.Setup(p => p.DoesTechnologyNameExist(It.IsAny<string>())).Returns(Task.FromResult(false));
this.TechnologyRepositoryMock.Setup(p => p.EditAsync(It.IsAny<Technology>())).Returns(Task.FromResult(shouldPass));
this.MapperMock.Setup(p => p.Map<Technology>(It.IsAny<UpdateTechnologyServiceModel>())).Returns(technology);
@@ -180,7 +180,7 @@ namespace DevHive.Services.Tests
Id = id
};
- this.TechnologyRepositoryMock.Setup(p => p.DoesTechnologyExist(It.IsAny<Guid>())).Returns(Task.FromResult(false));
+ this.TechnologyRepositoryMock.Setup(p => p.DoesTechnologyExistAsync(It.IsAny<Guid>())).Returns(Task.FromResult(false));
try
{
@@ -206,7 +206,7 @@ namespace DevHive.Services.Tests
Id = id
};
- this.TechnologyRepositoryMock.Setup(p => p.DoesTechnologyExist(It.IsAny<Guid>())).Returns(Task.FromResult(true));
+ this.TechnologyRepositoryMock.Setup(p => p.DoesTechnologyExistAsync(It.IsAny<Guid>())).Returns(Task.FromResult(true));
this.TechnologyRepositoryMock.Setup(p => p.DoesTechnologyNameExist(It.IsAny<string>())).Returns(Task.FromResult(true));
try
@@ -233,7 +233,7 @@ namespace DevHive.Services.Tests
Guid id = new Guid();
Technology technology = new Technology();
- this.TechnologyRepositoryMock.Setup(p => p.DoesTechnologyExist(It.IsAny<Guid>())).Returns(Task.FromResult(true));
+ this.TechnologyRepositoryMock.Setup(p => p.DoesTechnologyExistAsync(It.IsAny<Guid>())).Returns(Task.FromResult(true));
this.TechnologyRepositoryMock.Setup(p => p.GetByIdAsync(It.IsAny<Guid>())).Returns(Task.FromResult(technology));
this.TechnologyRepositoryMock.Setup(p => p.DeleteAsync(It.IsAny<Technology>())).Returns(Task.FromResult(shouldPass));
@@ -251,7 +251,7 @@ namespace DevHive.Services.Tests
string exceptionMessage = "Technology does not exist!";
Guid id = new Guid();
- this.TechnologyRepositoryMock.Setup(p => p.DoesTechnologyExist(It.IsAny<Guid>())).Returns(Task.FromResult(false));
+ this.TechnologyRepositoryMock.Setup(p => p.DoesTechnologyExistAsync(It.IsAny<Guid>())).Returns(Task.FromResult(false));
try
{