Example #1
0
        public async Task GetDetailsByIdAsync_WithSupplementIdAndPage_ShouldReturnValidServiceModel()
        {
            // Arrange
            FitStoreDbContext database = this.Database;

            DatabaseHelper.SeedData(database);

            IManufacturerService manufacturerService = new ManufacturerService(database);

            // Act
            ManufacturerDetailsServiceModel result = await manufacturerService.GetDetailsByIdAsync(firstManufacturerId, page);

            // Assert
            result.Id.Should().Be(1);
            result.Name.Should().Be("Manufacturer 1");
            result.Supplements.Count().Should().Be(2);
        }