public void Insert1ChangeDistinctTransactions() { var logic = new VendorMachine.Logic(); logic.Input("1.00"); var result = logic.Input("CHANGE"); Assert.AreEqual("=1.00 1.00", result); }
public void JustChange() { var logic = new VendorMachine.Logic(); var result = logic.Input("CHANGE"); Assert.AreEqual("=0.00 NO_CHANGE", result); }
public void RequestElevenCokes() { var logic = new VendorMachine.Logic(); var result = logic.Input("1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 Coke Coke Coke Coke Coke Coke Coke Coke Coke Coke Coke"); Assert.AreEqual("NO_PRODUCT =11.00", result); }
public void SampleTest4() { var logic = new VendorMachine.Logic(); var result = logic.Input("1.00 Pastelina Pastelina Pastelina"); Assert.AreEqual("Pastelina =0.70 Pastelina =0.40 Pastelina =0.10", result); }
public void SampleTest3() { var logic = new VendorMachine.Logic(); var result = logic.Input("0.25 0.05 Pastelina CHANGE"); Assert.AreEqual("Pastelina =0.00 NO_CHANGE", result); }
public void SampleTest1() { var logic = new VendorMachine.Logic(); var result = logic.Input("0.50 1.00 Coke"); Assert.AreEqual("Coke =0.00", result); }
public void Request9Pastelinas() { var logic = new VendorMachine.Logic(); logic.Input("0.50 Pastelina CHANGE"); logic.Input("0.50 Pastelina CHANGE"); logic.Input("0.50 Pastelina CHANGE"); logic.Input("0.50 Pastelina CHANGE"); logic.Input("0.50 Pastelina CHANGE"); logic.Input("0.50 Pastelina CHANGE"); logic.Input("0.50 Pastelina CHANGE"); logic.Input("0.50 Pastelina CHANGE"); var result = logic.Input("0.50 Pastelina CHANGE"); Assert.AreEqual("NO_COINS =0.50", result); }