public void GetTotalDayCollection_Retrieves_DailySalesDetails_In_Given_Branch_On_Given_Day()
        {
            var dailySaleDetails = new DailySaleDetails();
            dailySalesRepositoryMock.Setup(repo => repo.GetDailySaleDetails(branchName, currentTime)).Returns(dailySaleDetails);

            var totalCollection = collectionService.GetTotalDayCollection(branchName, currentTime);

            totalCollection.DailySaleDetails.ShouldEqual(dailySaleDetails);
        }
 public ActionResult Create(DailySaleDetails dailySaleDetails, CustomUserIdentity customUserIdentity, string password)
 {
     if (!ModelState.IsValid)
     {
         return View(dailySaleDetails);
     }
     if (password != customUserIdentity.Password)
     {
         ModelState.AddModelError("Password", "Invalid Password");
         return View(dailySaleDetails);
     }
     if (dailySaleDetailsRepository.IsDailySaleClosed(dailySaleDetails.DateTime, customUserIdentity.BranchName))
     {
         ModelState.AddModelError("DateTime", "Daily sale already closed for the given day!");
         return View(dailySaleDetails);
     }
     dailySaleDetails.BranchName = customUserIdentity.BranchName;
     dailySaleDetailsRepository.Add(dailySaleDetails);
     return RedirectToAction("Index", "Game");
 }