public GivenTheFilenameIsValid() { fakeFile = "aFakeFile.txt"; fakeUser = "******"; _fakeLockingService = new FakeLockingService(); lockingController = new LockingController(_fakeLockingService); result = lockingController.Lock(fakeUser, fakeFile); content = Assert.IsType<OkNegotiatedContentResult<string>>(result); }
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); }