Exemplo n.º 1
0
 public GivenTheFilenameIsValid()
 {
     fakeFile = "aFakeFile.txt";
     fakeUser = "******";
     _fakeLockingService = new FakeLockingService();
     lockingController = new LockingController(_fakeLockingService);
     result = lockingController.Lock(fakeUser, fakeFile);
     content = Assert.IsType<OkNegotiatedContentResult<string>>(result);
 }
Exemplo n.º 2
0
 public void ThenTheSameFileCantBeLockedAgain()
 {
     var secondResult = new LockingController(_fakeLockingService).Lock("anotherUser", fakeFile);
     var secondResponse = Assert.IsType<BadRequestErrorMessageResult>(secondResult);
     Assert.Equal("The file is already locked", secondResponse.Message);
 }