private static GrainStock MakeAndSeedStock(GrainType type, int amount) { var stock = new GrainStock(new List <KeyValuePair <GrainType, int> >() { new KeyValuePair <GrainType, int>(type, amount) }); return(stock); }
public void GivenTheStockIsEmpty_WhenIPour_IShouldGetAnException() { var stock = new GrainStock(new List <KeyValuePair <GrainType, int> >()); Assert.That(() => stock.PoorGrain(GrainType.Cafe, CancellationToken.None), Throws.InvalidOperationException); }