Ejemplo n.º 1
0
        public void NotValidCommand1()
        {
            var    obj      = new DressUPLogic();
            String response = obj.getResponses("COLD", "8, 16, 3, 4, 2, 5, 7");

            Assert.AreEqual("Removing PJs, fail", response);
        }
Ejemplo n.º 2
0
        public void ShirtAfterHeadwear()
        {
            var    obj      = new DressUPLogic();
            String response = obj.getResponses("HOT", "8, 6, 2, 4");

            Assert.AreEqual("Removing PJs, shorts, fail", response);
        }
Ejemplo n.º 3
0
        public void NotEnoughClothes()
        {
            var    obj      = new DressUPLogic();
            String response = obj.getResponses("COLD", "8, 6, 3, 4, 2, 5, 7");

            Assert.AreEqual("Removing PJs, pants, socks, shirt, hat, jacket, fail", response);
        }
Ejemplo n.º 4
0
        public void PantsAfterShoes()
        {
            var    obj      = new DressUPLogic();
            String response = obj.getResponses("COLD", "8, 1, 6, 2, 3");

            Assert.AreEqual("Removing PJs, fail", response);
        }
Ejemplo n.º 5
0
        public void ShirtAfterJacket()
        {
            var    obj      = new DressUPLogic();
            String response = obj.getResponses("COLD", "8, 3, 5, 4");

            Assert.AreEqual("Removing PJs, socks, fail", response);
        }
Ejemplo n.º 6
0
        public void JacketWhenHot()
        {
            var    obj      = new DressUPLogic();
            String response = obj.getResponses("HOT", "7,1");

            Assert.AreEqual("fail", response);
        }
Ejemplo n.º 7
0
        public void SocksWhenHot()
        {
            var    obj      = new DressUPLogic();
            String response = obj.getResponses("HOT", "8,3");

            Assert.AreEqual("Removing PJs, fail", response);
        }
Ejemplo n.º 8
0
        public void OnePieceEach()
        {
            var    obj      = new DressUPLogic();
            String response = obj.getResponses("HOT", "8, 6, 1, 1");

            Assert.AreEqual("Removing PJs, shorts, sandals, fail", response);
        }
Ejemplo n.º 9
0
        public void TakeOffPajamasFirst()
        {
            var    obj      = new DressUPLogic();
            String response = obj.getResponses("HOT", "7,1");

            Assert.AreEqual("fail", response);
        }
Ejemplo n.º 10
0
 public ActionResult DressUp(DressUpModel Mdl)
 {
     try
     {
         DressUPLogic DBL  = new DressUPLogic();
         String       Comd = Mdl.Commands.Replace(" ", "").Trim(',');
         Mdl.Result = DBL.getResponses(Mdl.Temp, Comd);
         return(View("Index", Mdl));
     }
     catch (Exception)
     {
         return(View("InternalError"));
     }
 }