public void Then_The_Url_Is_Correctly_Constructed(Guid id, Guid userId)
        {
            //Act
            var actual = new DeleteShortlistItemForUserRequest(id, userId);

            //Assert
            actual.DeleteUrl.Should().Be($"api/shortlist/users/{userId}/items/{id}");
        }
Пример #2
0
        public async Task Then_If_The_Request_Is_Valid_The_Service_Is_Called(
            DeleteShortlistItemForUserRequest request,
            [Frozen] Mock <IShortlistService> service,
            DeleteShortlistItemForUserRequestHandler handler)
        {
            //Act
            await handler.Handle(request, CancellationToken.None);

            //Assert
            service.Verify(x => x.DeleteShortlistUserItem(request.Id, request.ShortlistUserId), Times.Once);
        }