public void RefillById_Valid_RefillDetails()
        {
            Mock <IRefillRepository> mock = new Mock <IRefillRepository>();

            mock.Setup(p => p.viewRefillStatus(7)).Returns(cust);
            RefillController r = new RefillController(mock.Object);
            var data           = r.RefillStatus(7) as OkObjectResult;

            Assert.AreEqual(200, data.StatusCode);
        }
 public void RefillById_InValid_RefillDetails()
 {
     try
     {
         RefillDetails            obj  = new RefillDetails();
         Mock <IRefillRepository> mock = new Mock <IRefillRepository>();
         mock.Setup(p => p.viewRefillStatus(10)).Returns(null);
         RefillController r = new RefillController(mock.Object);
         var data           = r.RefillStatus(10) as OkObjectResult;
         Assert.AreEqual(200, data.StatusCode);
     }
     catch (Exception e)
     {
         Assert.AreEqual("Object reference not set to an instance of an object.", e.Message);
     }
 }