Skip to content

Commit

Permalink
Merge pull request #2649 from hassanhabib/users/glhays/coderub-retrie…
Browse files Browse the repository at this point in the history
…ve-rename-retrievebyid

CODE RUB: Retrieve Rename RetrieveById
  • Loading branch information
hassanhabib committed Jul 23, 2023
2 parents 109e492 + bde5beb commit 2d9579c
Show file tree
Hide file tree
Showing 59 changed files with 177 additions and 168 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace OtripleS.Web.Api.Tests.Unit.Services.Foundations.AssignmentAttachments
public partial class AssignmentAttachmentServiceTests
{
[Fact]
public async Task ShouldThrowDependencyExceptionOnRetrieveWhenSqlExceptionOccursAndLogItAsync()
public async Task ShouldThrowDependencyExceptionOnRetrieveByIdWhenSqlExceptionOccursAndLogItAsync()
{
// given
Guid someAttachmentId = Guid.NewGuid();
Expand Down Expand Up @@ -62,7 +62,7 @@ public async Task ShouldThrowDependencyExceptionOnRetrieveWhenSqlExceptionOccurs
}

[Fact]
public async Task ShouldThrowDependencyExceptionOnRetrieveWhenDbExceptionOccursAndLogItAsync()
public async Task ShouldThrowDependencyExceptionOnRetrieveByIdWhenDbExceptionOccursAndLogItAsync()
{
// given
Guid someAttachmentId = Guid.NewGuid();
Expand Down Expand Up @@ -107,7 +107,7 @@ public async Task ShouldThrowDependencyExceptionOnRetrieveWhenDbExceptionOccursA
}

[Fact]
public async Task ShouldThrowDependencyValidationOnRetrieveWhenDbUpdateConcurrencyOccursAndLogItAsync()
public async Task ShouldThrowDependencyValidationOnRetrieveByIdWhenDbUpdateConcurrencyOccursAndLogItAsync()
{
// given
Guid someAttachmentId = Guid.NewGuid();
Expand Down Expand Up @@ -152,7 +152,7 @@ public async Task ShouldThrowDependencyValidationOnRetrieveWhenDbUpdateConcurren
}

[Fact]
public async Task ShouldThrowServiceExceptionOnRetrieveWhenExceptionOccursAndLogItAsync()
public async Task ShouldThrowServiceExceptionOnRetrieveByIdWhenExceptionOccursAndLogItAsync()
{
// given
Guid someAttachmentId = Guid.NewGuid();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace OtripleS.Web.Api.Tests.Unit.Services.Foundations.AssignmentAttachments
public partial class AssignmentAttachmentServiceTests
{
[Fact]
public async Task ShouldThrowValidatonExceptionOnRetrieveWhenAssignmentIdIsInvalidAndLogItAsync()
public async Task ShouldThrowValidatonExceptionOnRetrieveByIdWhenAssignmentIdIsInvalidAndLogItAsync()
{
// given
Guid randomAttachmentId = Guid.NewGuid();
Expand Down Expand Up @@ -56,7 +56,7 @@ public async Task ShouldThrowValidatonExceptionOnRetrieveWhenAssignmentIdIsInval
}

[Fact]
public async Task ShouldThrowValidatonExceptionOnRetrieveWhenAttachmentIdIsInvalidAndLogItAsync()
public async Task ShouldThrowValidatonExceptionOnRetrieveByIdWhenAttachmentIdIsInvalidAndLogItAsync()
{
// given
Guid randomAttachmentId = default;
Expand Down Expand Up @@ -97,7 +97,7 @@ public async Task ShouldThrowValidatonExceptionOnRetrieveWhenAttachmentIdIsInval
}

[Fact]
public async Task ShouldThrowValidationExceptionOnRetrieveWhenStorageAssignmentAttachmentIsInvalidAndLogItAsync()
public async Task ShouldThrowValidationExceptionOnRetrieveByIdWhenStorageAssignmentAttachmentIsInvalidAndLogItAsync()
{
// given
AssignmentAttachment randomAssignmentAttachment = CreateRandomAssignmentAttachment();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace OtripleS.Web.Api.Tests.Unit.Services.Foundations.Assignments
public partial class AssignmentServiceTests
{
[Fact]
public async Task ShouldThrowDependencyExceptionOnRetrieveWhenSqlExceptionOccursAndLogIt()
public async Task ShouldThrowDependencyExceptionOnRetrieveByIdWhenSqlExceptionOccursAndLogIt()
{
// given
Guid someAssignmentId = Guid.NewGuid();
Expand Down Expand Up @@ -54,7 +54,7 @@ public async Task ShouldThrowDependencyExceptionOnRetrieveWhenSqlExceptionOccurs
}

[Fact]
public async Task ShouldThrowDependencyExceptionOnRetrieveWhenDbExceptionOccursAndLogIt()
public async Task ShouldThrowDependencyExceptionOnRetrieveByIdWhenDbExceptionOccursAndLogIt()
{
// given
Guid someAssignmentId = Guid.NewGuid();
Expand Down Expand Up @@ -91,7 +91,7 @@ public async Task ShouldThrowDependencyExceptionOnRetrieveWhenDbExceptionOccursA
}

[Fact]
public async Task ShouldThrowServiceExceptionOnRetrieveWhenExceptionOccursAndLogIt()
public async Task ShouldThrowServiceExceptionOnRetrieveByIdWhenExceptionOccursAndLogIt()
{
// given
Guid someAssignmentId = Guid.NewGuid();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace OtripleS.Web.Api.Tests.Unit.Services.Foundations.Assignments
public partial class AssignmentServiceTests
{
[Fact]
public async void ShouldThrowValidationExceptionOnRetrieveWhenIdIsInvalidAndLogItAsync()
public async void ShouldThrowValidationExceptionOnRetrieveByIdWhenIdIsInvalidAndLogItAsync()
{
//given
Guid randomAssignmentId = default;
Expand Down Expand Up @@ -53,7 +53,7 @@ public async void ShouldThrowValidationExceptionOnRetrieveWhenIdIsInvalidAndLogI
}

[Fact]
public async void ShouldThrowValidationExceptionOnRetrieveWhenStorageAssignmentIsNullAndLogItAsync()
public async void ShouldThrowValidationExceptionOnRetrieveByIdWhenStorageAssignmentIsNullAndLogItAsync()
{
//given
Guid randomAssignmentId = Guid.NewGuid();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace OtripleS.Web.Api.Tests.Unit.Services.Foundations.Attachments
public partial class AttachmentServiceTests
{
[Fact]
public async Task ShouldThrowDependencyExceptionOnRetrieveWhenSqlExceptionOccursAndLogIt()
public async Task ShouldThrowDependencyExceptionOnRetrieveByIdWhenSqlExceptionOccursAndLogIt()
{
// given
var someAttachmentId = Guid.NewGuid();
Expand Down Expand Up @@ -55,7 +55,7 @@ public async Task ShouldThrowDependencyExceptionOnRetrieveWhenSqlExceptionOccurs
}

[Fact]
public async Task ShouldThrowDependencyExceptionOnRetrieveWhenDbExceptionOccursAndLogIt()
public async Task ShouldThrowDependencyExceptionOnRetrieveByIdWhenDbExceptionOccursAndLogIt()
{
// given
var someAttachmentId = Guid.NewGuid();
Expand Down Expand Up @@ -94,7 +94,7 @@ public async Task ShouldThrowDependencyExceptionOnRetrieveWhenDbExceptionOccursA
}

[Fact]
public async Task ShouldThrowServiceExceptionOnRetrieveWhenExceptionOccursAndLogIt()
public async Task ShouldThrowServiceExceptionOnRetrieveByIdWhenExceptionOccursAndLogIt()
{
// given
var someAttachmentId = Guid.NewGuid();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace OtripleS.Web.Api.Tests.Unit.Services.Foundations.Attachments
public partial class AttachmentServiceTests
{
[Fact]
public async void ShouldThrowValidationExceptionOnRetrieveWhenIdIsInvalidAndLogItAsync()
public async void ShouldThrowValidationExceptionOnRetrieveByIdWhenIdIsInvalidAndLogItAsync()
{
//given
Guid randomAttachmentId = default;
Expand Down Expand Up @@ -54,7 +54,7 @@ public async void ShouldThrowValidationExceptionOnRetrieveWhenIdIsInvalidAndLogI
}

[Fact]
public async void ShouldThrowValidationExceptionOnRetrieveWhenStorageAttachmentIsNullAndLogItAsync()
public async void ShouldThrowValidationExceptionOnRetrieveByIdWhenStorageAttachmentIsNullAndLogItAsync()
{
//given
Guid randomAttachmentId = Guid.NewGuid();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace OtripleS.Web.Api.Tests.Unit.Services.Foundations.Attendances
public partial class AttendanceServiceTests
{
[Fact]
public async Task ShouldThrowDependencyExceptionOnRetrieveWhenSqlExceptionOccursAndLogItAsync()
public async Task ShouldThrowDependencyExceptionOnRetrieveByIdWhenSqlExceptionOccursAndLogItAsync()
{
// given
Guid someAttendanceId = Guid.NewGuid();
Expand Down Expand Up @@ -56,7 +56,7 @@ public async Task ShouldThrowDependencyExceptionOnRetrieveWhenSqlExceptionOccurs
}

[Fact]
public async Task ShouldThrowDependencyExceptionOnRetrieveWhenDbExceptionOccursAndLogItAsync()
public async Task ShouldThrowDependencyExceptionOnRetrieveByIdWhenDbExceptionOccursAndLogItAsync()
{
// given
Guid someAttendanceId = Guid.NewGuid();
Expand Down Expand Up @@ -96,7 +96,7 @@ public async Task ShouldThrowDependencyExceptionOnRetrieveWhenDbExceptionOccursA
}

[Fact]
public async Task ShouldThrowServiceExceptionOnRetrieveWhenExceptionOccursAndLogItAsync()
public async Task ShouldThrowServiceExceptionOnRetrieveByIdWhenExceptionOccursAndLogItAsync()
{
// given
Guid someAttendanceId = Guid.NewGuid();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace OtripleS.Web.Api.Tests.Unit.Services.Foundations.Attendances
public partial class AttendanceServiceTests
{
[Fact]
public async Task ShouldThrowValidationExceptionOnRetrieveWhenIdIsNullAndLogItAsync()
public async Task ShouldThrowValidationExceptionOnRetrieveByIdWhenIdIsNullAndLogItAsync()
{
// given
DateTimeOffset dateTimeOffset = GetRandomDateTime();
Expand Down Expand Up @@ -56,7 +56,7 @@ public async Task ShouldThrowValidationExceptionOnRetrieveWhenIdIsNullAndLogItAs
}

[Fact]
public async Task ShouldThrowValidationExceptionOnRetrieveWhenStorageAttendanceIsNullAndLogItAsync()
public async Task ShouldThrowValidationExceptionOnRetrieveByIdWhenStorageAttendanceIsNullAndLogItAsync()
{
// given
DateTimeOffset dateTimeOffset = GetRandomDateTime();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace OtripleS.Web.Api.Tests.Unit.Services.Foundations.CalendarEntries
public partial class CalendarEntryServiceTests
{
[Fact]
public async Task ShouldThrowDependencyExceptionOnRetrieveWhenSqlExceptionOccursAndLogItAsync()
public async Task ShouldThrowDependencyExceptionOnRetrieveByIdWhenSqlExceptionOccursAndLogItAsync()
{
// given
Guid someCalendarEntryId = Guid.NewGuid();
Expand Down Expand Up @@ -56,7 +56,7 @@ public async Task ShouldThrowDependencyExceptionOnRetrieveWhenSqlExceptionOccurs
}

[Fact]
public async Task ShouldThrowDependencyExceptionOnRetrieveWhenDbExceptionOccursAndLogItAsync()
public async Task ShouldThrowDependencyExceptionOnRetrieveByIdWhenDbExceptionOccursAndLogItAsync()
{
// given
Guid someCalendarEntryId = Guid.NewGuid();
Expand Down Expand Up @@ -96,7 +96,7 @@ public async Task ShouldThrowDependencyExceptionOnRetrieveWhenDbExceptionOccursA
}

[Fact]
public async Task ShouldThrowServiceExceptionOnRetrieveWhenExceptionOccursAndLogItAsync()
public async Task ShouldThrowServiceExceptionOnRetrieveByIdWhenExceptionOccursAndLogItAsync()
{
// given
Guid someCalendarEntryId = Guid.NewGuid();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace OtripleS.Web.Api.Tests.Unit.Services.Foundations.CalendarEntries
public partial class CalendarEntryServiceTests
{
[Fact]
public async void ShouldThrowValidationExceptionOnRetrieveWhenIdIsInvalidAndLogItAsync()
public async void ShouldThrowValidationExceptionOnRetrieveByIdWhenIdIsInvalidAndLogItAsync()
{
// given
Guid randomCalendarEntryId = default;
Expand Down Expand Up @@ -56,7 +56,7 @@ public async void ShouldThrowValidationExceptionOnRetrieveWhenIdIsInvalidAndLogI

[Fact]
public async void
ShouldThrowValidationExceptionOnRetrieveWhenStorageCalendarEntryIsNullAndLogItAsync()
ShouldThrowValidationExceptionOnRetrieveByIdWhenStorageCalendarEntryIsNullAndLogItAsync()
{
// given
Guid randomCalendarEntryId = Guid.NewGuid();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace OtripleS.Web.Api.Tests.Unit.Services.Foundations.CalendarEntryAttachme
public partial class CalendarEntryAttachmentServiceTests
{
[Fact]
public async Task ShouldThrowDependencyExceptionOnRetrieveWhenSqlExceptionOccursAndLogItAsync()
public async Task ShouldThrowDependencyExceptionOnRetrieveByIdWhenSqlExceptionOccursAndLogItAsync()
{
// given
Guid someAttachmentId = Guid.NewGuid();
Expand Down Expand Up @@ -55,7 +55,7 @@ var expectedCalendarEntryAttachmentDependencyException
}

[Fact]
public async Task ShouldThrowDependencyExceptionOnRetrieveWhenDbExceptionOccursAndLogItAsync()
public async Task ShouldThrowDependencyExceptionOnRetrieveByIdWhenDbExceptionOccursAndLogItAsync()
{
// given
Guid someAttachmentId = Guid.NewGuid();
Expand Down Expand Up @@ -93,7 +93,7 @@ public async Task ShouldThrowDependencyExceptionOnRetrieveWhenDbExceptionOccursA
}

[Fact]
public async Task ShouldThrowDependencyExceptionOnRetrieveWhenDbUpdateConcurrencyExceptionOccursAndLogItAsync()
public async Task ShouldThrowDependencyExceptionOnRetrieveByIdWhenDbUpdateConcurrencyExceptionOccursAndLogItAsync()
{
// given
Guid someAttachmentId = Guid.NewGuid();
Expand Down Expand Up @@ -133,7 +133,7 @@ public async Task ShouldThrowDependencyExceptionOnRetrieveWhenDbUpdateConcurrenc
}

[Fact]
public async Task ShouldThrowServiceExceptionOnRetrieveWhenExceptionOccursAndLogItAsync()
public async Task ShouldThrowServiceExceptionOnRetrieveByIdWhenExceptionOccursAndLogItAsync()
{
// given
Guid someAttachmentId = Guid.NewGuid();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace OtripleS.Web.Api.Tests.Unit.Services.Foundations.CalendarEntryAttachme
public partial class CalendarEntryAttachmentServiceTests
{
[Fact]
public async Task ShouldThrowValidatonExceptionOnRetrieveWhenIdsAreInvalidAndLogItAsync()
public async Task ShouldThrowValidatonExceptionOnRetrieveByIdWhenIdsAreInvalidAndLogItAsync()
{
// given
Guid invalidCalendarEntryId = Guid.Empty;
Expand Down Expand Up @@ -62,7 +62,7 @@ public async Task ShouldThrowValidatonExceptionOnRetrieveWhenIdsAreInvalidAndLog

[Fact]
public async Task
ShouldThrowValidationExceptionOnRetrieveWhenStorageCalendarEntryAttachmentIsInvalidAndLogItAsync()
ShouldThrowValidationExceptionOnRetrieveByIdWhenStorageCalendarEntryAttachmentIsInvalidAndLogItAsync()
{
// given
CalendarEntryAttachment randomCalendarEntryAttachment = CreateRandomCalendarEntryAttachment();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace OtripleS.Web.Api.Tests.Unit.Services.Foundations.Calendars
public partial class CalendarServiceTests
{
[Fact]
public async Task ShouldThrowDependencyExceptionOnRetrieveWhenSqlExceptionOccursAndLogItAsync()
public async Task ShouldThrowDependencyExceptionOnRetrieveByIdWhenSqlExceptionOccursAndLogItAsync()
{
// given
Guid someCalendarId = Guid.NewGuid();
Expand Down Expand Up @@ -56,7 +56,7 @@ public async Task ShouldThrowDependencyExceptionOnRetrieveWhenSqlExceptionOccurs
}

[Fact]
public async Task ShouldThrowDependencyExceptionOnRetrieveWhenDbExceptionOccursAndLogItAsync()
public async Task ShouldThrowDependencyExceptionOnRetrieveByIdWhenDbExceptionOccursAndLogItAsync()
{
// given
Guid someCalendarId = Guid.NewGuid();
Expand Down Expand Up @@ -96,7 +96,7 @@ public async Task ShouldThrowDependencyExceptionOnRetrieveWhenDbExceptionOccursA
}

[Fact]
public async Task ShouldThrowServiceExceptionOnRetrieveWhenExceptionOccursAndLogItAsync()
public async Task ShouldThrowServiceExceptionOnRetrieveByIdWhenExceptionOccursAndLogItAsync()
{
// given
Guid someCalendarId = Guid.NewGuid();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace OtripleS.Web.Api.Tests.Unit.Services.Foundations.Calendars
public partial class CalendarServiceTests
{
[Fact]
public async void ShouldThrowValidationExceptionOnRetrieveWhenIdIsInvalidAndLogItAsync()
public async void ShouldThrowValidationExceptionOnRetrieveByIdWhenIdIsInvalidAndLogItAsync()
{
// given
Guid randomCalendarId = default;
Expand Down Expand Up @@ -55,7 +55,7 @@ public async void ShouldThrowValidationExceptionOnRetrieveWhenIdIsInvalidAndLogI
}

[Fact]
public async void ShouldThrowValidationExceptionOnRetrieveWhenStorageCalendarIsNullAndLogItAsync()
public async void ShouldThrowValidationExceptionOnRetrieveByIdWhenStorageCalendarIsNullAndLogItAsync()
{
// given
Guid randomCalendarId = Guid.NewGuid();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace OtripleS.Web.Api.Tests.Unit.Services.Foundations.Classrooms
public partial class ClassroomServiceTests
{
[Fact]
public async void ShouldThrowValidationExceptionOnRetrieveWhenIdIsInvalidAndLogItAsync()
public async void ShouldThrowValidationExceptionOnRetrieveByIdWhenIdIsInvalidAndLogItAsync()
{
//given
Guid randomClassroomId = default;
Expand Down Expand Up @@ -53,7 +53,7 @@ public async void ShouldThrowValidationExceptionOnRetrieveWhenIdIsInvalidAndLogI
}

[Fact]
public async void ShouldThrowValidationExceptionOnRetrieveWhenStorageClassroomIsNullAndLogItAsync()
public async void ShouldThrowValidationExceptionOnRetrieveByIdWhenStorageClassroomIsNullAndLogItAsync()
{
//given
Guid randomClassroomId = Guid.NewGuid();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace OtripleS.Web.Api.Tests.Unit.Services.Foundations.Contacts
public partial class ContactServiceTests
{
[Fact]
public async Task ShouldThrowDependencyExceptionOnRetrieveWhenSqlExceptionOccursAndLogIt()
public async Task ShouldThrowDependencyExceptionOnRetrieveByIdWhenSqlExceptionOccursAndLogIt()
{
// given
var sqlException = GetSqlException();
Expand Down Expand Up @@ -58,7 +58,7 @@ public async Task ShouldThrowDependencyExceptionOnRetrieveWhenSqlExceptionOccurs
}

[Fact]
public async Task ShouldThrowDependencyExceptionOnRetrieveWhenDbExceptionOccursAndLogIt()
public async Task ShouldThrowDependencyExceptionOnRetrieveByIdWhenDbExceptionOccursAndLogIt()
{
// given
var databaseUpdateException = new DbUpdateException();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace OtripleS.Web.Api.Tests.Unit.Services.Foundations.Contacts
public partial class ContactServiceTests
{
[Fact]
public async void ShouldThrowValidationExceptionOnRetrieveWhenIdIsInvalidAndLogItAsync()
public async void ShouldThrowValidationExceptionOnRetrieveByIdWhenIdIsInvalidAndLogItAsync()
{
//given
Guid randomContactId = default;
Expand Down Expand Up @@ -53,7 +53,7 @@ public async void ShouldThrowValidationExceptionOnRetrieveWhenIdIsInvalidAndLogI
}

[Fact]
public async void ShouldThrowValidationExceptionOnRetrieveWhenStorageContactIsNullAndLogItAsync()
public async void ShouldThrowValidationExceptionOnRetrieveByIdWhenStorageContactIsNullAndLogItAsync()
{
//given
Guid randomContactId = Guid.NewGuid();
Expand Down
Loading

0 comments on commit 2d9579c

Please sign in to comment.