From 11e34b3df139c8438aeb51de7c7a7cfe29732479 Mon Sep 17 00:00:00 2001 From: Greg Hays Date: Fri, 21 Jul 2023 17:33:23 -0700 Subject: [PATCH] CODE RUB: TeacherContact RetrieveById --- ...TeacherContactServiceTests.Exceptions.RetrieveById.cs | 6 +++--- ...TeacherContactServiceTests.Validation.RetrieveById.cs | 9 +++++---- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/OtripleS.Web.Api.Tests.Unit/Services/Foundations/TeacherContacts/TeacherContactServiceTests.Exceptions.RetrieveById.cs b/OtripleS.Web.Api.Tests.Unit/Services/Foundations/TeacherContacts/TeacherContactServiceTests.Exceptions.RetrieveById.cs index 6e40b34d8..7afd47c32 100644 --- a/OtripleS.Web.Api.Tests.Unit/Services/Foundations/TeacherContacts/TeacherContactServiceTests.Exceptions.RetrieveById.cs +++ b/OtripleS.Web.Api.Tests.Unit/Services/Foundations/TeacherContacts/TeacherContactServiceTests.Exceptions.RetrieveById.cs @@ -17,7 +17,7 @@ namespace OtripleS.Web.Api.Tests.Unit.Services.Foundations.TeacherContacts public partial class TeacherContactServiceTests { [Fact] - public async Task ShouldThrowDependencyExceptionOnRetrieveWhenSqlExceptionOccursAndLogItAsync() + public async Task ShouldThrowDependencyExceptionOnRetrieveByIdWhenSqlExceptionOccursAndLogItAsync() { // given Guid someContactId = Guid.NewGuid(); @@ -52,7 +52,7 @@ await Assert.ThrowsAsync(() => } [Fact] - public async Task ShouldThrowDependencyExceptionOnRetrieveWhenDbUpdateExceptionOccursAndLogItAsync() + public async Task ShouldThrowDependencyExceptionOnRetrieveByIdWhenDbUpdateExceptionOccursAndLogItAsync() { // given Guid someContactId = Guid.NewGuid(); @@ -87,7 +87,7 @@ await Assert.ThrowsAsync( } [Fact] - public async Task ShouldThrowServiceExceptionOnRetrieveWhenExceptionOccursAndLogItAsync() + public async Task ShouldThrowServiceExceptionOnRetrieveByIdWhenExceptionOccursAndLogItAsync() { // given Guid someContactId = Guid.NewGuid(); diff --git a/OtripleS.Web.Api.Tests.Unit/Services/Foundations/TeacherContacts/TeacherContactServiceTests.Validation.RetrieveById.cs b/OtripleS.Web.Api.Tests.Unit/Services/Foundations/TeacherContacts/TeacherContactServiceTests.Validation.RetrieveById.cs index b3dd017f8..1b8668034 100644 --- a/OtripleS.Web.Api.Tests.Unit/Services/Foundations/TeacherContacts/TeacherContactServiceTests.Validation.RetrieveById.cs +++ b/OtripleS.Web.Api.Tests.Unit/Services/Foundations/TeacherContacts/TeacherContactServiceTests.Validation.RetrieveById.cs @@ -15,7 +15,7 @@ namespace OtripleS.Web.Api.Tests.Unit.Services.Foundations.TeacherContacts public partial class TeacherContactServiceTests { [Fact] - public async Task ShouldThrowValidatonExceptionOnRetrieveWhenTeacherIdIsInvalidAndLogItAsync() + public async Task ShouldThrowValidatonExceptionOnRetrieveByIdWhenTeacherIdIsInvalidAndLogItAsync() { // given Guid randomContactId = Guid.NewGuid(); @@ -51,7 +51,7 @@ public async Task ShouldThrowValidatonExceptionOnRetrieveWhenTeacherIdIsInvalidA } [Fact] - public async Task ShouldThrowValidatonExceptionOnRetrieveWhenContactIdIsInvalidAndLogItAsync() + public async Task ShouldThrowValidatonExceptionOnRetrieveByIdWhenContactIdIsInvalidAndLogItAsync() { // given Guid randomContactId = default; @@ -71,7 +71,8 @@ public async Task ShouldThrowValidatonExceptionOnRetrieveWhenContactIdIsInvalidA this.teacherContactService.RetrieveTeacherContactByIdAsync(inputTeacherId, inputContactId); // then - await Assert.ThrowsAsync(() => retrieveTeacherContactTask.AsTask()); + await Assert.ThrowsAsync(() => + retrieveTeacherContactTask.AsTask()); this.loggingBrokerMock.Verify(broker => broker.LogError(It.Is(SameExceptionAs( @@ -87,7 +88,7 @@ public async Task ShouldThrowValidatonExceptionOnRetrieveWhenContactIdIsInvalidA } [Fact] - public async Task ShouldThrowValidationExceptionOnRetrieveWhenStorageTeacherContactIsInvalidAndLogItAsync() + public async Task ShouldThrowValidationExceptionOnRetrieveByIdWhenStorageTeacherContactIsInvalidAndLogItAsync() { // given DateTimeOffset randomDateTime = GetRandomDateTime();