Would the following work here?

```csharp
Touch(repo.Info.WorkingDirectory, "newfile", "my my, this is gonna crash\n");

Touch(repo.Info.Path, "index.lock");

Assert.Throws<LockedFileException>(() => repo.Index.Stage("newfile"));
```