Example #1
0
        public void PaySlip_Not_Placed_And_Moved()
        {
            var paySlip = new PaySlipEngine.NSWPaySlipEngine();

            paySlip.Move();
            var result = paySlip.Report();

            Assert.IsTrue(string.IsNullOrEmpty(result));
        }
Example #2
0
        public void PaySlip_PlacedInside_PlacedOutside()
        {
            var paySlip = new PaySlipEngine.NSWPaySlipEngine();

            paySlip.Place(2, 2, Direction.EAST);
            paySlip.Place(6, 2, Direction.EAST);
            var result = paySlip.Report();

            Assert.AreEqual("2,2,EAST", paySlip.Report());
        }
Example #3
0
        public void PaySlip_PlacedOutside()
        {
            var paySlip = new PaySlipEngine.NSWPaySlipEngine();

            paySlip.Place(2, 5, Direction.EAST);
            paySlip.Move();
            var result = paySlip.Report();

            Assert.IsTrue(string.IsNullOrEmpty(result));
        }
Example #4
0
        public void PaySlip_Placed_Moved_Turned_Report()
        {
            var paySlip = new PaySlipEngine.NSWPaySlipEngine();

            paySlip.Place(1, 2, Direction.EAST);
            paySlip.Move();
            paySlip.Move();
            paySlip.Left();
            paySlip.Move();
            Assert.AreEqual("3,3,NORTH", paySlip.Report());
        }
Example #5
0
 public Simulator()
 {
     _paySlip = new PaySlipEngine.NSWPaySlipEngine();
 }