コード例 #1
0
        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);
        }
コード例 #2
0
        public void GivenTheStockIsEmpty_WhenIPour_IShouldGetAnException()
        {
            var stock = new GrainStock(new List <KeyValuePair <GrainType, int> >());

            Assert.That(() => stock.PoorGrain(GrainType.Cafe, CancellationToken.None), Throws.InvalidOperationException);
        }