EasyTest.Sdk
1.0.1
dotnet add package EasyTest.Sdk --version 1.0.1
NuGet\Install-Package EasyTest.Sdk -Version 1.0.1
<PackageReference Include="EasyTest.Sdk" Version="1.0.1" />
<PackageVersion Include="EasyTest.Sdk" Version="1.0.1" />
<PackageReference Include="EasyTest.Sdk" />
paket add EasyTest.Sdk --version 1.0.1
#r "nuget: EasyTest.Sdk, 1.0.1"
#:package EasyTest.Sdk@1.0.1
#addin nuget:?package=EasyTest.Sdk&version=1.0.1
#tool nuget:?package=EasyTest.Sdk&version=1.0.1
■ Exceptions
● Assert.ThrowsException
public static class AssertEx
{
public static T ThrowsWithMessage<T>(Action action, string message)
where T : Exception
{
var ex = Assert.ThrowsException<T>(action);
Assert.IsTrue(ex.Message.Contains(message));
return ex;
}
}
■ Attributes ● AssemblyInitialize ● AssemblyCleanup ● DynamicData
Flow
AssemblyInitialize 🚀 (1 lần) ↓ ClassInitialize (mỗi class) ↓ TestInitialize (mỗi test) ↓ TestMethod ↓ TestCleanup ↓ ClassCleanup ↓ AssemblyCleanup 🔚 (1 lần)
[TestClass] public sealed class Test1 { [AssemblyInitialize] public static void AssemblyInit(TestContext context) { // This method is called once for the test assembly, before any tests are run. }
[AssemblyCleanup]
public static void AssemblyCleanup()
{
// This method is called once for the test assembly, after all tests are run.
}
[ClassInitialize]
public static void ClassInit(TestContext context)
{
// This method is called once for the test class, before any tests of the class are run.
}
[ClassCleanup]
public static void ClassCleanup()
{
// This method is called once for the test class, after all tests of the class are run.
}
[TestInitialize]
public void TestInit()
{
// This method is called before each test method.
}
[TestCleanup]
public void TestCleanup()
{
// This method is called after each test method.
}
[TestMethod]
public void TestMethod1()
{
}
}
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net9.0
- CommunityToolkit.Mvvm (>= 8.4.0)
- Microsoft.CodeAnalysis.Common (>= 5.3.0)
- Newtonsoft.Json (>= 13.0.4)
- Serilog (>= 4.2.0)
- Serilog.Sinks.Console (>= 6.0.0)
- Serilog.Sinks.File (>= 6.0.0)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on EasyTest.Sdk:
| Package | Downloads |
|---|---|
|
EasyTest.Plugins.Oracle
Package Description |
|
|
EasyTest.Plugins.Retry
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.