test
This commit is contained in:
@ -4,11 +4,11 @@ using System.IO;
|
||||
using System.Xml;
|
||||
using System.Net.Http;
|
||||
|
||||
using NUnit.Framework;
|
||||
using System.Threading.Tasks;
|
||||
using Newtonsoft.Json;
|
||||
using isn.Abstract;
|
||||
using System.Linq;
|
||||
using Xunit;
|
||||
|
||||
namespace isn.tests
|
||||
{
|
||||
@ -16,7 +16,7 @@ namespace isn.tests
|
||||
{
|
||||
private DataRow dataRow;
|
||||
|
||||
[Test]
|
||||
[Fact]
|
||||
public void HAveADefaultDataProtector()
|
||||
{
|
||||
string pass = "a lame and big pass";
|
||||
@ -24,11 +24,12 @@ namespace isn.tests
|
||||
string protectedpass = _protector.Protect(pass);
|
||||
string unprotectedpass = _protector.UnProtect(protectedpass);
|
||||
Console.WriteLine(protectedpass);
|
||||
Assert.AreEqual(pass, unprotectedpass);
|
||||
Assert.Pass($"Good jod man! (decoding {protectedpass})");
|
||||
Assert.Equal(pass, unprotectedpass);
|
||||
Assert.True(protectedpass!=null);
|
||||
Assert.True(protectedpass.Length>0);
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Fact]
|
||||
public void Test()
|
||||
{
|
||||
System.Data.DataTable dataTable = new System.Data.DataTable();
|
||||
@ -42,7 +43,7 @@ dataTable.Rows.Add(dataRow);
|
||||
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Fact]
|
||||
public async Task TestHttpClient()
|
||||
{
|
||||
string url = "http://localhost:88/index.json";
|
||||
@ -55,14 +56,14 @@ dataTable.Rows.Add(dataRow);
|
||||
Assert.NotNull(vm);
|
||||
Assert.NotNull(vm.Resources);
|
||||
}
|
||||
[Test]
|
||||
[Fact]
|
||||
public async Task TestPush()
|
||||
{
|
||||
Program.LoadConfig();
|
||||
var report = await Program.PushPkgAsync(new string[] { "bin/Debug/isn.1.0.1.nupkg" });
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Fact]
|
||||
public async Task GetServerResourcesUsingWebRequestAsyncTest()
|
||||
{
|
||||
var model = await SourceHelpers.GetServerResourcesUsingWebRequestAsync("Http://localhost:88/index.json");
|
||||
|
@ -1,16 +1,22 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>net45</TargetFrameworks>
|
||||
<TargetFrameworks>net6</TargetFrameworks>
|
||||
|
||||
<IsPackable>false</IsPackable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.4" />
|
||||
<PackageReference Include="NUnit" Version="3.13.1" />
|
||||
<PackageReference Include="NUnit3TestAdapter" Version="3.17.0" />
|
||||
<PackageReference Include="coverlet.collector" Version="3.0.2" />
|
||||
<PackageReference Include="xunit" Version="2.4.1" />
|
||||
<PackageReference Include="xunit.abstractions" Version="2.0.3" />
|
||||
|
||||
<PackageReference Include="xunit.runner.reporters" Version="2.4.1" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" />
|
||||
|
||||
<PackageToolReference Include="xunit.runner.console" Version="2.4.1" PrivateAssets="All"/>
|
||||
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
13
test/isn.tests/xunitTest1.cs
Normal file
13
test/isn.tests/xunitTest1.cs
Normal file
@ -0,0 +1,13 @@
|
||||
using Xunit;
|
||||
|
||||
namespace isn.tests
|
||||
{
|
||||
public class xunitTest1
|
||||
{
|
||||
[Fact]
|
||||
void Test1()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
@ -16,7 +16,6 @@ namespace isnd.host.tests
|
||||
const string testingUrl = "http://localhost:5000";
|
||||
|
||||
|
||||
[Fact]
|
||||
public void TestHaveTestDbContextAndMigrate()
|
||||
{
|
||||
string envVar = Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT");
|
||||
|
@ -10,9 +10,11 @@
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.App" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.4" />
|
||||
<PackageReference Include="xunit" Version="2.4.0" />
|
||||
<PackageReference Include="xunit" Version="2.4.1" />
|
||||
<PackageReference Include="xunit.abstractions" Version="2.0.3" />
|
||||
<PackageReference Include="xunit.runner.reporters" Version="2.4.1" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" />
|
||||
<PackageReference Include="xunit.runner.msbuild" Version="2.4.1" />
|
||||
|
||||
<PackageToolReference Include="xunit.runner.console" Version="2.4.1" PrivateAssets="All"/>
|
||||
<PackageReference Include="coverlet.collector" Version="1.2.0" />
|
||||
|
Reference in New Issue
Block a user