Skip to content

Commit

Permalink
Finished Milestone 2 and Fixed Milestone 1
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewfschwartz committed Sep 4, 2020
1 parent 407b016 commit db14327
Show file tree
Hide file tree
Showing 32 changed files with 714 additions and 18 deletions.
3 changes: 3 additions & 0 deletions Data/Drinks/AretinoAppleJuice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@

namespace BleakwindBuffet.Data.Drinks
{
/// <summary>
/// Class defining a AretinoAppleJuice object
/// </summary>
public class AretinoAppleJuice
{
private Size size = Size.Small;
Expand Down
3 changes: 3 additions & 0 deletions Data/Drinks/CandlehearthCoffee.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@

namespace BleakwindBuffet.Data.Drinks
{
/// <summary>
/// Class defining a CandlehearthCoffee object
/// </summary>
public class CandlehearthCoffee
{
private Size size = Size.Small;
Expand Down
3 changes: 3 additions & 0 deletions Data/Drinks/MarkarthMilk.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@

namespace BleakwindBuffet.Data.Drinks
{
/// <summary>
/// Class defining a MarkarthMilk object
/// </summary>
public class MarkarthMilk
{
private Size size = Size.Small;
Expand Down
3 changes: 3 additions & 0 deletions Data/Drinks/SailorSoda.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@

namespace BleakwindBuffet.Data.Drinks
{
/// <summary>
/// Class defining a SailorSoda object
/// </summary>
public class SailorSoda
{
private Size size = Size.Small;
Expand Down
3 changes: 3 additions & 0 deletions Data/Drinks/WarriorWater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@

namespace BleakwindBuffet.Data.Drinks
{
/// <summary>
/// Class defining a WarriorWater object
/// </summary>
public class WarriorWater
{
private Size size = Size.Small;
Expand Down
3 changes: 3 additions & 0 deletions Data/Entrees/BriarheartBurger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@

namespace BleakwindBuffet.Data.Entrees
{
/// <summary>
/// Class defining a Briarheart Burger object
/// </summary>
public class BriarheartBurger
{
private double price = 6.32;
Expand Down
3 changes: 3 additions & 0 deletions Data/Entrees/DoubleDraugr.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@

namespace BleakwindBuffet.Data.Entrees
{
/// <summary>
/// Class for defining a Double Draugr object
/// </summary>
public class DoubleDraugr
{
private double price = 7.32;
Expand Down
3 changes: 3 additions & 0 deletions Data/Entrees/GardenOrcOmelette.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@

namespace BleakwindBuffet.Data.Entrees
{
/// <summary>
/// Class for defining a Garden Orc Omelette object
/// </summary>
public class GardenOrcOmelette
{
private double price = 4.57;
Expand Down
3 changes: 3 additions & 0 deletions Data/Entrees/PhillyPoacher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@

namespace BleakwindBuffet.Data.Entrees
{
/// <summary>
/// Class for defining a Philly Poacher object
/// </summary>
public class PhillyPoacher
{
private double price = 7.23;
Expand Down
3 changes: 3 additions & 0 deletions Data/Entrees/SmokehouseSkeleton.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@

namespace BleakwindBuffet.Data.Entrees
{
/// <summary>
/// Class for defining a Smokehouse Skeleton object
/// </summary>
public class SmokehouseSkeleton
{
private double price = 5.62;
Expand Down
3 changes: 3 additions & 0 deletions Data/Entrees/ThalmorTriple.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@

namespace BleakwindBuffet.Data.Entrees
{
/// <summary>
/// Class for defining a Thalmor Triple object
/// </summary>
public class ThalmorTriple
{
private double price = 8.32;
Expand Down
3 changes: 3 additions & 0 deletions Data/Entrees/ThugsTBone.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@

namespace BleakwindBuffet.Data.Entrees
{
/// <summary>
/// Class for defining a Thugs T-Bone object
/// </summary>
public class ThugsTBone
{
private double price = 6.44;
Expand Down
3 changes: 3 additions & 0 deletions Data/Sides/DragonbornWaffleFries.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@

namespace BleakwindBuffet.Data.Sides
{
/// <summary>
/// Class for defining a Dragonborn Waffle Fries object
/// </summary>
public class DragonbornWaffleFries
{
private Size size = Size.Small;
Expand Down
3 changes: 3 additions & 0 deletions Data/Sides/FriedMiraak.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@

namespace BleakwindBuffet.Data.Sides
{
/// <summary>
/// Class for defining a Fried Miraak object
/// </summary>
public class FriedMiraak
{
private Size size = Size.Small;
Expand Down
3 changes: 3 additions & 0 deletions Data/Sides/MadOtarGrits.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@

namespace BleakwindBuffet.Data.Sides
{
/// <summary>
/// Class for defining a Mad Otar Grits object
/// </summary>
public class MadOtarGrits
{
private Size size = Size.Small;
Expand Down
3 changes: 3 additions & 0 deletions Data/Sides/VokunSalad.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@

namespace BleakwindBuffet.Data.Sides
{
/// <summary>
/// Class for defining a Vokun Salad object
/// </summary>
public class VokunSalad
{
private Size size = Size.Small;
Expand Down
36 changes: 35 additions & 1 deletion DataTests/UnitTests/DrinkTests/AretinoAppleJuiceTests.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Author: Zachery Brunner
* Author: Matthew Schwartz
* Class: AretinoAppleJuiceTests.cs
* Purpose: Test the AretinoAppleJuice.cs class in the Data library
*/
Expand All @@ -11,22 +11,34 @@

namespace BleakwindBuffet.DataTests.UnitTests.DrinkTests
{
/// <summary>
/// Class to test the AretinoAppleJuice.cs class
/// </summary>
public class AretinoAppleJuiceTests
{
/// <summary>
/// Checks to make sure ice is not included by default
/// </summary>
[Fact]
public void ShouldNotIncludeIceByDefault()
{
AretinoAppleJuice a = new AretinoAppleJuice();
Assert.False(a.Ice);
}

/// <summary>
/// Checks to make sure the size is small by default
/// </summary>
[Fact]
public void ShouldBeSmallByDefault()
{
AretinoAppleJuice a = new AretinoAppleJuice();
Assert.Equal(Size.Small, a.Size);
}

/// <summary>
/// Checks to make sure the setter for ice works
/// </summary>
[Fact]
public void ShouldBeAbleToSetIce()
{
Expand All @@ -37,6 +49,9 @@ public void ShouldBeAbleToSetIce()
Assert.False(a.Ice);
}

/// <summary>
/// Checks to make sure the setter for size works
/// </summary>
[Fact]
public void ShouldBeAbleToSetSize()
{
Expand All @@ -49,6 +64,11 @@ public void ShouldBeAbleToSetSize()
Assert.Equal(Size.Small, a.Size);
}

/// <summary>
/// Checks to make sure the right price is assigned
/// </summary>
/// <param name="size">The size of the drink</param>
/// <param name="price">The price the drink should have</param>
[Theory]
[InlineData(Size.Small, 0.62)]
[InlineData(Size.Medium, 0.87)]
Expand All @@ -60,6 +80,11 @@ public void ShouldHaveCorrectPriceForSize(Size size, double price)
Assert.Equal(price, a.Price);
}

/// <summary>
/// Checks to make sure the right calorie count is correct
/// </summary>
/// <param name="size">The size of the drink</param>
/// <param name="cal">How many calories the drink should have</param>
[Theory]
[InlineData(Size.Small, 44)]
[InlineData(Size.Medium, 88)]
Expand All @@ -71,6 +96,10 @@ public void ShouldHaveCorrectCaloriesForSize(Size size, uint cal)
Assert.Equal(cal, a.Calories);
}

/// <summary>
/// Checks to make sure the special instructions are updated
/// </summary>
/// <param name="includeIce">Represents whether or not a customer wants ice</param>
[Theory]
[InlineData(true)]
[InlineData(false)]
Expand All @@ -82,6 +111,11 @@ public void ShouldHaveCorrectSpecialInstructions(bool includeIce)
if (!includeIce) Assert.DoesNotContain("Add ice", a.SpecialInstructions);
}

/// <summary>
/// Checks the ToString method outputs the correct string
/// </summary>
/// <param name="size">The size of the drink</param>
/// <param name="name">The value that ToString should return</param>
[Theory]
[InlineData(Size.Small, "Small Aretino Apple Juice")]
[InlineData(Size.Medium, "Medium Aretino Apple Juice")]
Expand Down
50 changes: 49 additions & 1 deletion DataTests/UnitTests/DrinkTests/CandlehearthCoffeeTests.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Author: Zachery Brunner
* Author: Matthew Schwartz
* Class: CandlehearthCoffeeTests.cs
* Purpose: Test the CandlehearthCoffee.cs class in the Data library
*/
Expand All @@ -11,36 +11,54 @@

namespace BleakwindBuffet.DataTests.UnitTests.DrinkTests
{
/// <summary>
/// Class to test the CandlehearthCoffee.cs class
/// </summary>
public class CandlehearthCoffeeTests
{
/// <summary>
/// Checks to make sure ice is not included by default
/// </summary>
[Fact]
public void ShouldNotIncludeIceByDefault()
{
CandlehearthCoffee c = new CandlehearthCoffee();
Assert.False(c.Ice);
}

/// <summary>
/// Checks to make sure coffee is not decaf by default
/// </summary>
[Fact]
public void ShouldNotBeDecafByDefault()
{
CandlehearthCoffee c = new CandlehearthCoffee();
Assert.False(c.Decaf);
}

/// <summary>
/// Checks to make coffee doesn't have cream by default
/// </summary>
[Fact]
public void ShouldNotHaveRoomForCreamByDefault()
{
CandlehearthCoffee c = new CandlehearthCoffee();
Assert.False(c.RoomForCream);
}

/// <summary>
/// Checks to make sure the size is small by default
/// </summary>
[Fact]
public void ShouldBeSmallByDefault()
{
CandlehearthCoffee c = new CandlehearthCoffee();
Assert.Equal(Size.Small, c.Size);
}

/// <summary>
/// Checks to make sure the setter for ice works
/// </summary>
[Fact]
public void ShouldBeAbleToSetIce()
{
Expand All @@ -51,6 +69,9 @@ public void ShouldBeAbleToSetIce()
Assert.False(c.Ice);
}

/// <summary>
/// Checks to make sure the setter for decaf works
/// </summary>
[Fact]
public void ShouldBeAbleToSetDecaf()
{
Expand All @@ -61,6 +82,9 @@ public void ShouldBeAbleToSetDecaf()
Assert.False(c.Decaf);
}

/// <summary>
/// Checks to make sure the setter for cream works
/// </summary>
[Fact]
public void ShouldBeAbleToSetRoomForCream()
{
Expand All @@ -71,6 +95,9 @@ public void ShouldBeAbleToSetRoomForCream()
Assert.False(c.RoomForCream);
}

/// <summary>
/// Checks to make sure the setter for size works
/// </summary>
[Fact]
public void ShouldBeAbleToSetSize()
{
Expand All @@ -83,6 +110,11 @@ public void ShouldBeAbleToSetSize()
Assert.Equal(Size.Small, c.Size);
}

/// <summary>
/// Checks to make sure the right price is assigned
/// </summary>
/// <param name="size">The size of the drink</param>
/// <param name="price">The price the drink should have</param>
[Theory]
[InlineData(Size.Small, 0.75)]
[InlineData(Size.Medium, 1.25)]
Expand All @@ -94,6 +126,11 @@ public void ShouldHaveCorrectPriceForSize(Size size, double price)
Assert.Equal(price, c.Price);
}

/// <summary>
/// Checks to make sure the right calorie count is correct
/// </summary>
/// <param name="size">The size of the drink</param>
/// <param name="cal">How many calories the drink should have</param>
[Theory]
[InlineData(Size.Small, 7)]
[InlineData(Size.Medium, 10)]
Expand All @@ -105,6 +142,11 @@ public void ShouldHaveCorrectCaloriesForSize(Size size, uint cal)
Assert.Equal(cal, c.Calories);
}

/// <summary>
/// Checks to make sure special instructions holds the correct order
/// </summary>
/// <param name="includeIce">Whether or not the customer wants ice</param>
/// <param name="includeCream">Whether or not the customer wants cream</param>
[Theory]
[InlineData(true, true)]
[InlineData(true, false)]
Expand All @@ -122,6 +164,12 @@ public void ShouldHaveCorrectSpecialInstructions(bool includeIce, bool includeCr

}

/// <summary>
/// Checks the ToString method outputs the correct string
/// </summary>
/// <param name="decaf">Whether the coffee is decaf or not</param>
/// <param name="size">The size of the drink</param>
/// <param name="name">The expected output of ToString</param>
[Theory]
[InlineData(true, Size.Small, "Small Decaf Candlehearth Coffee")]
[InlineData(true, Size.Medium, "Medium Decaf Candlehearth Coffee")]
Expand Down
Loading

0 comments on commit db14327

Please sign in to comment.