public void IngredientDoesntExist_ShouldThrow() { // arrange var query = new GetIngredientByIdQuery(int.MaxValue); // act Action act = () => this.RunQuery(query); // assert act.Should().Throw <IngredientNotFoundException>(); }
public void HappyPath() { // arrange var command = this.IngredientDataProvider.CreateCommand(); this.RunCommand(command); var query = new GetIngredientByIdQuery(command.Id.Value); // act var actual = this.RunQuery(query); // assert actual.Should().NotBeNull(); actual.Should().BeEquivalentTo(command); }