public IHttpActionResult Lock(string user, string file) { if (_lockingService.DoesLockExist(file)) { return(BadRequest("The file is already locked")); } _lockingService.CreateLock(file, new List <string>() { string.Format("{0}|{1}", user, DateTime.Now.ToString()) }); return(Ok(string.Format("Locked: {0}", file))); }
public void ThenTheLockExistsAfterwards() { Assert.True(_fakeLockingService.DoesLockExist(fakeFile)); }