Esempio n. 1
0
        public IHttpActionResult Override(string user, string file)
        {
            _lockingService.CreateLockOverride(file, user);
            var info     = _lockingService.RetrieveLockInfo(file);
            var response = string.Empty;

            info.ForEach(
                delegate(LockObject x) { response += string.Format("{0}:{1}\n", x.Username, x.LockedDateTime); });
            return(Ok(response));
        }
Esempio n. 2
0
        public void ThenTheFileCanBeLockedAgainWithAnOverride()
        {
            var secondUser = "******";

            lockingController.Override(secondUser, fakeFile);
            Assert.True(_fakeLockingService.RetrieveLockInfo(fakeFile).Count(x => x.Username == secondUser) == 1);
        }