Skip to content

Commit

Permalink
Fixed failing UTs
Browse files Browse the repository at this point in the history
  • Loading branch information
ju2pom committed Aug 31, 2017
1 parent 449a4c9 commit 7778b4f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 7 deletions.
10 changes: 5 additions & 5 deletions EverythingNet.Tests/AcceptanceTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

namespace EverythingNet.Tests
{
using System.Linq;

[TestFixture]
public class AcceptanceTests
{
Expand All @@ -33,10 +35,8 @@ public void Query()
.Or
.Name("SearchResult.cs");

foreach (var s in queryable)
{
Assert.That(s, Is.Not.Empty);
}
Assert.That(queryable.Where(x => x.FileName == "AcceptanceTests.cs"), Is.Not.Empty);
Assert.That(queryable.Where(x => x.FileName == "SearchResult.cs"), Is.Not.Empty);
}

[Test]
Expand All @@ -61,7 +61,7 @@ public void SearchGetFileName()

foreach (var result in queryable)
{
Assert.That(result.FileName, Is.EqualTo("AcceptanceTests"));
Assert.That(result.FileName, Is.EqualTo("AcceptanceTests.cs"));
}
}

Expand Down
16 changes: 14 additions & 2 deletions EverythingNet/Core/SearchResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,24 @@ public string FullPath

public string Path
{
get { return EverythingWrapper.Everything_GetResultPath(this.index); }
get
{
//return EverythingWrapper.Everything_GetResultPath(this.index);

// Temporary implementation until the native function works as expected
return System.IO.Path.GetDirectoryName(this.FullPath);
}
}

public string FileName
{
get { return EverythingWrapper.Everything_GetResultFileName(this.index); }
get
{
//return EverythingWrapper.Everything_GetResultFileName(this.index);

// Temporary implementation until the native function works as expected
return System.IO.Path.GetFileName(this.FullPath);
}
}

public long Size
Expand Down

0 comments on commit 7778b4f

Please sign in to comment.