Commit 56f9c4c3 authored by islater's avatar islater
Browse files

asdf

parent 56427ba5
......@@ -11,7 +11,7 @@ using System.Text;
namespace CowboyCafe.Data
{
public class AngryChicken : Entree// INotifyPropertyChanged
public class AngryChicken : Entree
{
......
......@@ -2,22 +2,23 @@
using System.Collections.Generic;
using System.Text;
using Xunit;
using System.ComponentModel;
using CowboyCafe.Data;
namespace CowboyCafe.DataTests
{
public class OrderTests
{
public class MockOrderItem : IOrderItem
public class MockOrderItem : IOrderItem, INotifyPropertyChanged
{
public double Price { get; set; }
public double Calories { get; set; }
public List<String> SpecialIstructions { get; }
public event PropertyChangedEventHandler PropertyChanged;
double IOrderItem.Price { get; }
uint IOrderItem.Calories { get; }
List<String> IOrderItem.SpecialInstructions { get; }
}
[Fact]
public void ShouldBeAbleToAddItems()
{
......@@ -42,6 +43,112 @@ namespace CowboyCafe.DataTests
}
[Fact]
public void AngryChickenImplementsINotifyPropertyChanged()
{
var chicken = new AngryChicken();
Assert.IsAssignableFrom<INotifyPropertyChanged>(chicken);
}
[Fact]
public void BakedBeansImplementsINotifyPropertyChanged()
{
var chicken = new BakedBeans();
Assert.IsAssignableFrom<INotifyPropertyChanged>(chicken);
}
[Fact]
public void ChiliCheeseFriesImplementsINotifyPropertyChanged()
{
var chicken = new ChiliCheeseFries();
Assert.IsAssignableFrom<INotifyPropertyChanged>(chicken);
}
[Fact]
public void CornDodgersImplementsINotifyPropertyChanged()
{
var chicken = new CornDodgers();
Assert.IsAssignableFrom<INotifyPropertyChanged>(chicken);
}
[Fact]
public void CowboyCoffeImplementsINotifyPropertyChanged()
{
var chicken = new CowboyCoffee();
Assert.IsAssignableFrom<INotifyPropertyChanged>(chicken);
}
[Fact]
public void CowpokeChiliImplementsINotifyPropertyChanged()
{
var chicken = new CowpokeChili();
Assert.IsAssignableFrom<INotifyPropertyChanged>(chicken);
}
[Fact]
public void DakotaDoubleBurgerImplementsINotifyPropertyChanged()
{
var chicken = new DakotaDoubleBurger();
Assert.IsAssignableFrom<INotifyPropertyChanged>(chicken);
}
[Fact]
public void JerkedSodaImplementsINotifyPropertyChanged()
{
var chicken = new JerkedSoda();
Assert.IsAssignableFrom<INotifyPropertyChanged>(chicken);
}
[Fact]
public void PandeCampoImplementsINotifyPropertyChanged()
{
var chicken = new PanDeCampo();
Assert.IsAssignableFrom<INotifyPropertyChanged>(chicken);
}
[Fact]
public void PecosPulledPorkImplementsINotifyPropertyChanged()
{
var chicken = new PecosPulledPork();
Assert.IsAssignableFrom<INotifyPropertyChanged>(chicken);
}
[Fact]
public void RustlersRibsImplementsINotifyPropertyChanged()
{
var chicken = new RustlersRibs();
Assert.IsAssignableFrom<INotifyPropertyChanged>(chicken);
}
[Fact]
public void TexasTeaImplementsINotifyPropertyChanged()
{
var chicken = new TexasTea();
Assert.IsAssignableFrom<INotifyPropertyChanged>(chicken);
}
[Fact]
public void TexasTripleBurgerImplementsINotifyPropertyChanged()
{
var chicken = new TexasTripleBurger();
Assert.IsAssignableFrom<INotifyPropertyChanged>(chicken);
}
[Fact]
public void WaterImplementsINotifyPropertyChanged()
{
var chicken = new Water();
Assert.IsAssignableFrom<INotifyPropertyChanged>(chicken);
}
[Fact]
public void ChangingBreadPropertyShouldInvokePropertyChangedForBread()
{
Object chicken = new AngryChicken();
Assert.PropertyChanged(chicken, "Bread", () => {
chicken.Bread = false;
});
}
[Fact]
public void ShouldBeAbleToGetEnumerationOfItems()
{
......@@ -80,7 +187,7 @@ namespace CowboyCafe.DataTests
total += price;
order.Add(new MockOrderItem()
{
Price = price
//Price = price
}
);
......@@ -125,5 +232,10 @@ namespace CowboyCafe.DataTests
}
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment