Skip to content

Commit 8c57359

Browse files
committed
(todo) Add initial null test
1 parent 83d8820 commit 8c57359

File tree

1 file changed

+58
-0
lines changed

1 file changed

+58
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
//
2+
// Copyright (c) Microsoft. All rights reserved.
3+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
4+
//
5+
6+
// using Microsoft.PowerShell.EditorServices.Test.Shared.Completion;
7+
// using Microsoft.PowerShell.EditorServices.Test.Shared.Definition;
8+
// using Microsoft.PowerShell.EditorServices.Test.Shared.Occurrences;
9+
// using Microsoft.PowerShell.EditorServices.Test.Shared.ParameterHint;
10+
// using Microsoft.PowerShell.EditorServices.Test.Shared.References;
11+
// using Microsoft.PowerShell.EditorServices.Test.Shared.SymbolDetails;
12+
// using Microsoft.PowerShell.EditorServices.Test.Shared.Symbols;
13+
using System;
14+
using System.IO;
15+
// using System.Linq;
16+
// using System.Threading.Tasks;
17+
using Xunit;
18+
using Microsoft.PowerShell.EditorServices;
19+
20+
namespace Microsoft.PowerShell.EditorServices.Test.Language
21+
{
22+
public class TokenOperationsTests : IDisposable
23+
{
24+
// private Workspace workspace;
25+
// private LanguageService languageService;
26+
// private PowerShellContext powerShellContext;
27+
// private const string baseSharedScriptPath = @"..\..\..\..\PowerShellEditorServices.Test.Shared\";
28+
29+
public TokenOperationsTests()
30+
{
31+
// var logger = Logging.NullLogger;
32+
// this.powerShellContext = PowerShellContextFactory.Create(logger);
33+
// this.workspace = new Workspace(this.powerShellContext.LocalPowerShellVersion.Version, logger);
34+
// this.languageService = new LanguageService(this.powerShellContext, logger);
35+
}
36+
37+
public void Dispose()
38+
{
39+
// this.powerShellContext.Dispose();
40+
}
41+
42+
private FoldingReference[] GetRegions(string text) {
43+
ScriptFile scriptFile = new ScriptFile(
44+
"testfile",
45+
"clienttestfile",
46+
text,
47+
Version.Parse("5.0"));
48+
return Microsoft.PowerShell.EditorServices.TokenOperations.FoldableRegions(scriptFile.ScriptTokens);
49+
}
50+
51+
[Fact]
52+
public void LaguageServiceFindsFoldablRegions() {
53+
FoldingReference[] result = GetRegions("abc");
54+
// var result = this.languageService
55+
Assert.Equal(result.Length, 0);
56+
}
57+
}
58+
}

0 commit comments

Comments
 (0)