Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 79 additions & 0 deletions OmniSharp.Tests/AutoComplete/BugFixTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,5 +112,84 @@ public MyClass()
}
}").ShouldContain("String(");
}

[Test]
public void WhenOneSpace_ThenShouldCompleteWithProperty()
{
CompletionsFor(
@"
public class MyClass
{
public class Foo
{
public string Bar { get; set; }
}

public MyClass()
{
var d = new Foo{ $
}
}").ShouldContain("Bar");
}

[Test]
public void WhenNoSpace_ThenShouldCompleteWithProperty()
{
CompletionsFor(
@"
public class MyClass
{
public class Foo
{
public string Bar { get; set; }
}

public MyClass()
{
var d = new Foo{$
}
}").ShouldContain("Bar");
}

[Test]
public void WhenNewLine_ThenShouldCompleteWithProperty()
{
CompletionsFor(
@"
public class MyClass
{
public class Foo
{
public string Bar { get; set; }
}

public MyClass()
{
var d = new Foo {
$
}
}").ShouldContain("Bar");
}

[Test]
public void WhenNewLineCol1_ThenShouldCompleteWithProperty()
{
CompletionsFor(
@"
public class MyClass
{
public class Foo
{
public string Bar { get; set; }
}

public MyClass()
{
var d = new Foo {
$
}
}"
).ShouldContain("Bar");
}
}
}