Update Test project to MSTest v2

This commit is contained in:
Tal Aloni 2023-12-22 12:06:08 +02:00
parent 576c8c499b
commit dbfab05f17
7 changed files with 6 additions and 38 deletions

View file

@ -4,12 +4,12 @@
* the GNU Lesser Public License as published by the Free Software Foundation, * the GNU Lesser Public License as published by the Free Software Foundation,
* either version 3 of the License, or (at your option) any later version. * either version 3 of the License, or (at your option) any later version.
*/ */
using System;
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;
using Utilities; using Utilities;
namespace SMBLibrary.Tests namespace SMBLibrary.Tests
{ {
[TestClass]
public class AesCcmTests public class AesCcmTests
{ {
[TestMethod] [TestMethod]

View file

@ -5,7 +5,6 @@
* either version 3 of the License, or (at your option) any later version. * either version 3 of the License, or (at your option) any later version.
*/ */
using System; using System;
using System.Collections.Generic;
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;
using SMBLibrary.NetBios; using SMBLibrary.NetBios;
using Utilities; using Utilities;

View file

@ -1,24 +0,0 @@
using System;
using System.Collections.Generic;
using System.IO;
namespace SMBLibrary.Tests
{
class Program
{
static void Main(string[] args)
{
new NTLMAuthenticationTests().TestAll();
new NTLMSigningTests().TestAll();
new AesCcmTests().TestAll();
new SMB2EncryptionTests().TestAll();
new RC4Tests().TestAll();
new NetBiosTests().TestAll();
new RPCTests().TestAll();
new SMB2SigningTests().TestAll();
new NTDirectoryFileSystemTests().TestAll();
}
}
}

View file

@ -4,12 +4,8 @@
* the GNU Lesser Public License as published by the Free Software Foundation, * the GNU Lesser Public License as published by the Free Software Foundation,
* either version 3 of the License, or (at your option) any later version. * either version 3 of the License, or (at your option) any later version.
*/ */
using System;
using System.Collections.Generic;
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;
using SMBLibrary.RPC;
using SMBLibrary.Services; using SMBLibrary.Services;
using Utilities;
namespace SMBLibrary.Tests namespace SMBLibrary.Tests
{ {

View file

@ -4,9 +4,6 @@
* the GNU Lesser Public License as published by the Free Software Foundation, * the GNU Lesser Public License as published by the Free Software Foundation,
* either version 3 of the License, or (at your option) any later version. * either version 3 of the License, or (at your option) any later version.
*/ */
using System;
using System.Collections.Generic;
using System.Security.Cryptography;
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;
using SMBLibrary.SMB2; using SMBLibrary.SMB2;
using Utilities; using Utilities;

View file

@ -1,10 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>net40</TargetFrameworks> <TargetFrameworks>net472;net6.0</TargetFrameworks>
<AssemblyName>SMBLibrary.Tests</AssemblyName> <AssemblyName>SMBLibrary.Tests</AssemblyName>
<RootNamespace>SMBLibrary.Tests</RootNamespace> <RootNamespace>SMBLibrary.Tests</RootNamespace>
<OutputType>Exe</OutputType> <OutputType>Library</OutputType>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
@ -17,9 +17,9 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework"> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.11.0" />
<HintPath>Components\Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll</HintPath> <PackageReference Include="MSTest.TestAdapter" Version="2.2.10" />
</Reference> <PackageReference Include="MSTest.TestFramework" Version="2.2.10" />
</ItemGroup> </ItemGroup>
</Project> </Project>