private static GetCatalogueItemResult CatalogueItemResultBuilder(CatalogueItemDto catalogueItem)
 {
     return(GetCatalogueItemResultBuilder
            .Create()
            .WithCatalogueItemId(catalogueItem.CatalogueItemId)
            .WithName(catalogueItem.Name)
            .Build());
 }
        public async Task GetAsync_CatalogueItemFound_ReturnsExpectedResponse()
        {
            var context  = CatalogueItemsControllerTestContext.Create();
            var response = await context.Controller.GetAsync(context.GetCatalogueItemDtoResult.CatalogueItemId);

            var expected = GetCatalogueItemResultBuilder
                           .Create()
                           .WithCatalogueItemId(context.GetCatalogueItemDtoResult.CatalogueItemId)
                           .WithName(context.GetCatalogueItemDtoResult.Name)
                           .Build();

            response.Value.Should().BeEquivalentTo(expected);
        }
        public async Task GetAsync_NullCatalogueItem_ReturnsEmptyGetCatalogueItemResult()
        {
            var context = CatalogueItemsControllerTestContext.Create();

            context.GetCatalogueItemDtoResult = null;

            var response = await context.Controller.GetAsync(string.Empty);

            var expected = GetCatalogueItemResultBuilder
                           .Create()
                           .WithCatalogueItemId(null)
                           .WithName(null)
                           .Build();

            response.Value.Should().BeEquivalentTo(expected);
        }