public void TakeOne_NotAvaliable_ExceptionThrown() { var info = new Product(Guid.NewGuid(), "Cookie", 10); var amount = 0; var instance = new ProductCollection(info, amount); var taken = instance.TakeOne(); }
public void IsAvaliableProperty_ZeroAmount_FalseReturned() { var info = new Product(Guid.NewGuid(), "Cookie", 10); var amount = 0; var instance = new ProductCollection(info, amount); Assert.IsFalse(instance.IsAvaliable); }
public void Constructor_ValidArguments_InstanceCreated() { var info = new Product(Guid.NewGuid(), "Cookie", 10); var amount = 10; var instance = new ProductCollection(info, amount); Assert.AreEqual(instance.ProductInfo, info); Assert.AreEqual(instance.Amount, amount); }
public void TakeOne_IsAvaliable_ProductReturned() { var info = new Product(Guid.NewGuid(), "Cookie", 10); var amount = 10; var instance = new ProductCollection(info, amount); var taken = instance.TakeOne(); Assert.AreEqual(info.Barcode, taken.Barcode); Assert.AreEqual(info.Name, taken.Name); Assert.AreEqual(info.Price, taken.Price); }