dsian.TwinCAT.Ads.Server.Mock.Extensions
0.1.0
See the version list below for details.
dotnet add package dsian.TwinCAT.Ads.Server.Mock.Extensions --version 0.1.0
NuGet\Install-Package dsian.TwinCAT.Ads.Server.Mock.Extensions -Version 0.1.0
<PackageReference Include="dsian.TwinCAT.Ads.Server.Mock.Extensions" Version="0.1.0" />
paket add dsian.TwinCAT.Ads.Server.Mock.Extensions --version 0.1.0
#r "nuget: dsian.TwinCAT.Ads.Server.Mock.Extensions, 0.1.0"
// Install dsian.TwinCAT.Ads.Server.Mock.Extensions as a Cake Addin #addin nuget:?package=dsian.TwinCAT.Ads.Server.Mock.Extensions&version=0.1.0 // Install dsian.TwinCAT.Ads.Server.Mock.Extensions as a Cake Tool #tool nuget:?package=dsian.TwinCAT.Ads.Server.Mock.Extensions&version=0.1.0
dsian.TwinCAT.Ads.Server.Mock.Extensions
Extension methods for dsian.TwinCAT.Ads.Server.Mock, on Nuget.
Replay
Extension to register Behaviors from a recorded TC3 ADS Monitor file (*.cap, see dsian.TwinCAT.AdsViewer.CapParser or Nuget).
This can be used for more sophisticated ADS requests, like reading symbols from a server.
With that tool, you can record a specific ADS communication and replay it for unit testing, see documentation TF6010 | TwinCAT ADS Monitor.
using (var serverMock = new Mock(12347, "AdsServerMock"))
{
serverMock.RegisterReplay(@".\TestFiles\RecordedAdsCommunication.cap");
// . . .
}
<a name="replayexample"/>
Example
using (var serverMock = new Mock(12347, "AdsServerMock"))
{
serverMock.RegisterReplay(@".\TestFiles\RecordedAdsCommunication.cap");
using (var client = new AdsClient())
{
// connect to our mocking server
client.Connect(serverMock.ServerAddress.Port);
if (client.IsConnected)
{
var symbolLoader = SymbolLoaderFactory.Create(client, new SymbolLoaderSettings(SymbolsLoadMode.Flat, TcAds.ValueAccess.ValueAccessMode.Default));
var symbols = await symbolLoader.GetSymbolsAsync(CancellationToken.None);
Assert.IsTrue(symbols.Succeeded);
}
}
}
TC3 ADS Monitor:
Download: TF6010 | TC3 ADS Monitor
Documentation: infosys.beckhoff.com
Minimum requirement for TC3 ADS Monitor: TC1000 | TC3 ADS
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 is compatible. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net5.0
- dsian.TwinCAT.Ads.Server.Mock (>= 0.5.0)
- dsian.TwinCAT.AdsViewer.CapParser.Lib (>= 1.0.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.