Skip to content

Commit

Permalink
IGNITE-7002 .NET: Add cross-platform examples on .NET Core
Browse files Browse the repository at this point in the history
(missed changes)

This closes #3119
  • Loading branch information
ptupitsyn committed Dec 5, 2017
1 parent 3b314f7 commit e15cbcc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Expand Up @@ -73,7 +73,8 @@ public static IEnumerable<Example> GetExamples()
{
var examplesAsm = typeof (ClosureExample).Assembly;

var sourceFiles = Directory.GetFiles(PathUtil.ExamplesSourcePath, "*.cs", SearchOption.AllDirectories);
var sourceFiles = Directory.GetFiles(PathUtil.ExamplesSourcePath, "*.cs", SearchOption.AllDirectories)
.Where(x => !x.Contains("dotnetcore")).ToArray();

Assert.IsTrue(sourceFiles.Any());

Expand Down Expand Up @@ -102,7 +103,9 @@ public static IEnumerable<Example> GetExamples()
/// </summary>
private static Action GetRunAction(Type type)
{
return (Action) Delegate.CreateDelegate(typeof (Action), type.GetMethod("Main"));
var mainMethod = type.GetMethod("Main");
Assert.IsNotNull(mainMethod);
return (Action) Delegate.CreateDelegate(typeof (Action), mainMethod);
}

/// <summary>
Expand Down
Expand Up @@ -37,7 +37,7 @@ public class ProjectFilesTest
public void TestCsprojToolsVersion()
{
var projFiles = GetDotNetSourceDir().GetFiles("*.csproj", SearchOption.AllDirectories)
.Where(x => !x.Name.Contains("DotNetCore")).ToArray();
.Where(x => !x.FullName.ToLower().Contains("dotnetcore")).ToArray();

Assert.GreaterOrEqual(projFiles.Length, 7);
CheckFiles(projFiles, x => !x.Contains("ToolsVersion=\"4.0\""), "Invalid csproj files: ");
Expand Down

0 comments on commit e15cbcc

Please sign in to comment.