示例#1
0
 public void ShouldHaveCorrectCaloriesForSize(Size size, uint cal)
 {
     Data.Drinks.CandlehearthCoffee drink = new Data.Drinks.CandlehearthCoffee();
     drink.Size = size;
     Assert.True(size == drink.Size);
     Assert.True(cal == drink.Calories);
 }
示例#2
0
 public void ShouldReturnCorrectToStringBasedOnSize(bool decaf, Size size, string name)
 {
     Data.Drinks.CandlehearthCoffee drink = new Data.Drinks.CandlehearthCoffee();
     drink.Size  = size;
     drink.Decaf = decaf;
     Assert.Equal(drink.ToString(), name);
 }
示例#3
0
 public void ShouldHaveCorrectPriceForSize(Size size, double price)
 {
     Data.Drinks.CandlehearthCoffee drink = new Data.Drinks.CandlehearthCoffee();
     drink.Size = size;
     Assert.True(size == drink.Size);
     Assert.True(price == drink.Price);
 }
示例#4
0
 public void ShouldHaveCorrectSpecialInstructions(bool includeIce, bool includeCream)
 {
     Data.Drinks.CandlehearthCoffee drink = new Data.Drinks.CandlehearthCoffee();
     drink.Ice          = includeIce;
     drink.RoomForCream = includeCream;
     if (drink.Ice)
     {
         Assert.Contains <string>("Add ice", drink.SpecialInstructions);
     }
     if (drink.RoomForCream)
     {
         Assert.Contains <string>("Add cream", drink.SpecialInstructions);
     }
 }
示例#5
0
 public void ShouldBeAbleToSetSize()
 {
     Data.Drinks.CandlehearthCoffee drink = new Data.Drinks.CandlehearthCoffee();
     drink.Size = Size.Medium;
     Assert.False(drink.Size == Size.Small);
 }
示例#6
0
 public void ShouldBeAbleToSetRoomForCream()
 {
     Data.Drinks.CandlehearthCoffee drink = new Data.Drinks.CandlehearthCoffee();
     drink.RoomForCream = true;
     Assert.True(drink.RoomForCream);
 }
示例#7
0
 public void ShouldBeAbleToSetDecaf()
 {
     Data.Drinks.CandlehearthCoffee drink = new Data.Drinks.CandlehearthCoffee();
     drink.Decaf = true;
     Assert.True(drink.Decaf);
 }
示例#8
0
 public void ShouldBeAbleToSetIce()
 {
     Data.Drinks.CandlehearthCoffee drink = new Data.Drinks.CandlehearthCoffee();
     drink.Ice = true;
     Assert.True(drink.Ice);
 }
示例#9
0
 public void ShouldBeSmallByDefault()
 {
     Data.Drinks.CandlehearthCoffee drink = new Data.Drinks.CandlehearthCoffee();
     Assert.True(drink.Size == Size.Small);
 }
示例#10
0
 public void ShouldNotHaveRoomForCreamByDefault()
 {
     Data.Drinks.CandlehearthCoffee drink = new Data.Drinks.CandlehearthCoffee();
     Assert.False(drink.RoomForCream);
 }
示例#11
0
 public void ShouldNotBeDecafByDefault()
 {
     Data.Drinks.CandlehearthCoffee drink = new Data.Drinks.CandlehearthCoffee();
     Assert.False(drink.Decaf);
 }
示例#12
0
 public void ShouldNotIncludeIceByDefault()
 {
     Data.Drinks.CandlehearthCoffee drink = new Data.Drinks.CandlehearthCoffee();
     Assert.False(drink.Ice);
 }