Skip to content

Commit

Permalink
Testfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
savpek committed Jun 5, 2020
1 parent 92f41d9 commit a62d7d6
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion tests/OmniSharp.Cake.Tests/LineIndexHelperFacts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using Microsoft.CodeAnalysis.Text;
using Microsoft.Extensions.Logging;
using OmniSharp.Cake.Utilities;
using OmniSharp.FileWatching;
using OmniSharp.Services;
using OmniSharp.Utilities;
using Xunit;
Expand Down Expand Up @@ -59,7 +60,7 @@ private static OmniSharpWorkspace CreateSimpleWorkspace(string fileName, string
var workspace = new OmniSharpWorkspace(
new HostServicesAggregator(
Enumerable.Empty<IHostServicesProvider>(), new LoggerFactory()),
new LoggerFactory(), null);
new LoggerFactory(), new DummyFileSystemWatcher());

var projectInfo = ProjectInfo.Create(ProjectId.CreateNewId(), VersionStamp.Create(),
"ProjectNameVal", "AssemblyNameVal", LanguageNames.CSharp);
Expand Down Expand Up @@ -147,5 +148,16 @@ public async Task TranslateFromGenerated_Should_Translate_To_Negative_If_Outside

Assert.Equal(expected, actualIndex);
}

private class DummyFileSystemWatcher : IFileSystemWatcher
{
public void Watch(string pathOrExtension, FileSystemNotificationCallback callback)
{
}

public void WatchDirectories(FileSystemNotificationCallback callback)
{
}
}
}
}

0 comments on commit a62d7d6

Please sign in to comment.