Permalink
Browse files

upgraded javascript test project to .netcore and moved somethings aro…

…und to fix build on vsts pipeline
  • Loading branch information...
ehelin committed Aug 25, 2018
1 parent a210315 commit e23013f930fea0da8c3220dc1cd9551c0ac299c6

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.
@@ -5,7 +5,7 @@
using JSTest.ScriptLibraries;
using Newtonsoft.Json;
namespace TestJavaScript
namespace TestJavaScriptV2
{
public class BaseTest
{
@@ -4,15 +4,15 @@
using JSTest.ScriptElements;
using JSTest.ScriptLibraries;
namespace TestJavaScript
namespace TestJavaScriptV2
{
[TestClass]
public class ErrorHandlerTests : BaseTest
{
[TestMethod]
public void Test_ErrorHandler_ThrowsError()
{
var script = CreateJsTestScript(@"..\..\..\TgimbaNetCoreWeb\wwwroot\Scripts\HtmlVanillaJs\ErrorHandler.js");
var script = CreateJsTestScript(@"..\..\..\..\TgimbaNetCoreWeb\wwwroot\Scripts\HtmlVanillaJs\ErrorHandler.js");
Assert.IsTrue(TestErrorThrow(script, @" Error('error')"));
script = null;
@@ -4,15 +4,15 @@
using JSTest.ScriptElements;
using JSTest.ScriptLibraries;
namespace TestJavaScript
namespace TestJavaScriptV2
{
[TestClass]
public class InitTests : BaseTest
{
[TestMethod]
public void TestSandbox_DummyTestMethodReturns1()
{
var script = CreateJsTestScript(@"..\..\..\TgimbaNetCoreWeb\wwwroot\Scripts\HtmlVanillaJs\Global.js");
var script = CreateJsTestScript(@"..\..\..\..\TgimbaNetCoreWeb\wwwroot\Scripts\HtmlVanillaJs\Global.js");
script.RunTest(@"assert.equal(1, DummyTestMethodReturns1());");
}
@@ -0,0 +1,21 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.6.0" />
<PackageReference Include="MSTest.TestAdapter" Version="1.2.0" />
<PackageReference Include="MSTest.TestFramework" Version="1.2.0" />
</ItemGroup>
<ItemGroup>
<Reference Include="JSTest">
<HintPath>..\JSTest.dll</HintPath>
</Reference>
</ItemGroup>
</Project>
@@ -4,16 +4,16 @@
using JSTest.ScriptElements;
using JSTest.ScriptLibraries;
namespace TestJavaScript
namespace TestJavaScriptV2
{
[TestClass]
public class UtilityTests : BaseTest
{
[TestMethod]
public void Test_Utility_isNullUndefined_ThrowsNullError()
{
var script = CreateJsTestScript(@"..\..\..\TgimbaNetCoreWeb\wwwroot\Scripts\HtmlVanillaJs\Utilities.js");
script.AppendFile(@"..\..\..\TgimbaNetCoreWeb\wwwroot\Scripts\HtmlVanillaJs\ErrorHandler.js");
var script = CreateJsTestScript(@"..\..\..\..\TgimbaNetCoreWeb\wwwroot\Scripts\HtmlVanillaJs\Utilities.js");
script.AppendFile(@"..\..\..\..\TgimbaNetCoreWeb\wwwroot\Scripts\HtmlVanillaJs\ErrorHandler.js");
Assert.IsTrue(TestErrorThrow(script, @"isNullUndefined(null, 'location', 'expectedObjectNull')", "expectedObjectNull", "null"));
script = null;
@@ -22,8 +22,8 @@ public void Test_Utility_isNullUndefined_ThrowsNullError()
[TestMethod]
public void Test_Utility_isNullUndefined_ThrowsUndefinedError()
{
var script = CreateJsTestScript(@"..\..\..\TgimbaNetCoreWeb\wwwroot\Scripts\HtmlVanillaJs\Utilities.js");
script.AppendFile(@"..\..\..\TgimbaNetCoreWeb\wwwroot\Scripts\HtmlVanillaJs\ErrorHandler.js");
var script = CreateJsTestScript(@"..\..\..\..\TgimbaNetCoreWeb\wwwroot\Scripts\HtmlVanillaJs\Utilities.js");
script.AppendFile(@"..\..\..\..\TgimbaNetCoreWeb\wwwroot\Scripts\HtmlVanillaJs\ErrorHandler.js");
Assert.IsTrue(TestErrorThrow(script, @"isNullUndefined(undefined, 'location', 'expectedObjectNull')", "expectedObjectNull", "undefined"));
script = null;
@@ -32,8 +32,8 @@ public void Test_Utility_isNullUndefined_ThrowsUndefinedError()
[TestMethod]
public void Test_Utility_isNullUndefined_NoErrorThrown()
{
var script = CreateJsTestScript(@"..\..\..\TgimbaNetCoreWeb\wwwroot\Scripts\HtmlVanillaJs\Utilities.js");
script.AppendFile(@"..\..\..\TgimbaNetCoreWeb\wwwroot\Scripts\HtmlVanillaJs\ErrorHandler.js");
var script = CreateJsTestScript(@"..\..\..\..\TgimbaNetCoreWeb\wwwroot\Scripts\HtmlVanillaJs\Utilities.js");
script.AppendFile(@"..\..\..\..\TgimbaNetCoreWeb\wwwroot\Scripts\HtmlVanillaJs\ErrorHandler.js");
Assert.IsFalse(TestErrorThrow(script, @"isNullUndefined('I am an string', 'location', 'expectedObjectString')"));
script = null;
@@ -42,8 +42,8 @@ public void Test_Utility_isNullUndefined_NoErrorThrown()
[TestMethod]
public void Test_Utility_isNullUndefined_NoValueReturned()
{
var script = CreateJsTestScript(@"..\..\..\TgimbaNetCoreWeb\wwwroot\Scripts\HtmlVanillaJs\Utilities.js");
script.AppendFile(@"..\..\..\TgimbaNetCoreWeb\wwwroot\Scripts\HtmlVanillaJs\ErrorHandler.js");
var script = CreateJsTestScript(@"..\..\..\..\TgimbaNetCoreWeb\wwwroot\Scripts\HtmlVanillaJs\Utilities.js");
script.AppendFile(@"..\..\..\..\TgimbaNetCoreWeb\wwwroot\Scripts\HtmlVanillaJs\ErrorHandler.js");
Assert.IsNull(TestNonErrorGetResult(script, @"isNullUndefined('I am an string', 'location', 'expectedObjectString')"));
script = null;
View
@@ -28,7 +28,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestsTgimbaNetCoreWeb", "Te
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestsShared", "TestShared\TestsShared.csproj", "{1DDCF869-166F-46EA-ADAB-C3168E96B788}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestJavaScript", "TestJavaScript\TestJavaScript.csproj", "{90524221-F262-498F-ACE9-2718C88D2D18}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestJavaScriptV2", "TestJavaScriptV2\TestJavaScriptV2.csproj", "{234F724E-F026-4475-BBFB-924E4F7D4586}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -68,10 +68,10 @@ Global
{1DDCF869-166F-46EA-ADAB-C3168E96B788}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1DDCF869-166F-46EA-ADAB-C3168E96B788}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1DDCF869-166F-46EA-ADAB-C3168E96B788}.Release|Any CPU.Build.0 = Release|Any CPU
{90524221-F262-498F-ACE9-2718C88D2D18}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{90524221-F262-498F-ACE9-2718C88D2D18}.Debug|Any CPU.Build.0 = Debug|Any CPU
{90524221-F262-498F-ACE9-2718C88D2D18}.Release|Any CPU.ActiveCfg = Release|Any CPU
{90524221-F262-498F-ACE9-2718C88D2D18}.Release|Any CPU.Build.0 = Release|Any CPU
{234F724E-F026-4475-BBFB-924E4F7D4586}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{234F724E-F026-4475-BBFB-924E4F7D4586}.Debug|Any CPU.Build.0 = Debug|Any CPU
{234F724E-F026-4475-BBFB-924E4F7D4586}.Release|Any CPU.ActiveCfg = Release|Any CPU
{234F724E-F026-4475-BBFB-924E4F7D4586}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

0 comments on commit e23013f

Please sign in to comment.