Skip to content

Commit

Permalink
Refactored scenario tests (issue #32) (#52)
Browse files Browse the repository at this point in the history
* Refectored scenario tests according to #Bug 240688: Scenarios has a class Top5Scenarios with 2 scenarios defined

* Moved 'TrainAndPredictHousePriceModelTest' to separate file.
This closes issue #32
  • Loading branch information
zeahmed authored and glebuk committed May 8, 2018
1 parent ae66210 commit 500d703
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,17 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using Microsoft.ML.Models;
using Microsoft.ML.Runtime.Api;
using Microsoft.ML.TestFramework;
using Microsoft.ML.Trainers;
using Microsoft.ML.Transforms;
using Xunit;
using Xunit.Abstractions;

namespace Microsoft.ML.Scenarios
{
public partial class Top5Scenarios : BaseTestClass
public partial class ScenariosTests : BaseTestClass
{
/*
A real-estate firm Contoso wants to add a house price prediction to their ASP.NET/Xamarin application.
Expand Down Expand Up @@ -121,7 +124,7 @@ public class HousePricePrediction
public float Price;
}

public Top5Scenarios(ITestOutputHelper output) : base(output)
public ScenariosTests(ITestOutputHelper output) : base(output)
{
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
// Licensed to the .NET Foundation under one or more agreements.
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using Microsoft.ML.Models;
using Microsoft.ML.Runtime.Api;
using Microsoft.ML.TestFramework;
using Microsoft.ML.Trainers;
using Microsoft.ML.Transforms;
using Xunit;
using Xunit.Abstractions;

namespace Microsoft.ML.Scenarios
{
public partial class Top5Scenarios
public partial class ScenariosTests
{
[Fact(Skip = "Missing data set. See https://github.com/dotnet/machinelearning/issues/3")]
public void TrainAndPredictHousePriceModelTest()
Expand Down Expand Up @@ -70,4 +73,3 @@ public void TrainAndPredictHousePriceModelTest()
}
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

namespace Microsoft.ML.Scenarios
{
public partial class Top5Scenarios
public partial class ScenariosTests
{
[Fact]
public void TrainAndPredictIrisModelTest()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

namespace Microsoft.ML.Scenarios
{
public partial class Top5Scenarios
public partial class ScenariosTests
{
public const string SentimentDataPath = "wikipedia-detox-250-line-data.tsv";
public const string SentimentTestPath = "wikipedia-detox-250-line-test.tsv";
Expand Down

0 comments on commit 500d703

Please sign in to comment.