Пример #1
0
        public async Task GivenValidProductParameters_WhenCreateProductCommandSent_ThenCreatedDocumentStoredInDatabase()
        {
            var command = new CreateProduct(Guid.NewGuid(), "Name", 24.99m);

            await httpClient.PostAsync("products", GetContent(command));

            var document = await fixture.GetAsync(command.ProductId);

            document.Should().NotBeNull();
            document.Id.Should().Be(command.ProductId);
            document.Name.Should().Be(command.Name);
            document.Price.Should().Be(command.Price);
        }