Commit Graph

29 Commits

Author SHA1 Message Date
Michael Croes
0797c5858f chore: Update GitHubActionsTestLogger 2023-08-03 21:45:46 +02:00
Michael Croes
714ac62ab1 test: Add CommunicationSequence 2023-07-31 23:57:38 +02:00
Michael Croes
8126018afd test: Fix target framework*s* specification 2023-07-25 23:17:25 +02:00
Michael Croes
4e4071f07f test: Only target net462 on Windows 2023-07-24 22:04:18 +02:00
Michael Croes
7558b9a691 fix: Retarget test project to net462, net6.0 and net7.0
These are the frameworks currently used in the GitHub workflow, when
missing the tests aren't executed and the job will succeed nonetheless.
2023-07-23 22:53:11 +02:00
Serge Camille
fc9c33fdaf Add Net5.0 to test project as well. 2021-06-05 17:59:18 +02:00
Serge Camille
023530322e Remove Port 102 dependencies from Unit Test.
- Adjust readme.
- It is no longer be necessary to shut down service s7oiehsx64.
2020-09-13 10:15:53 +02:00
Serge Camille
9198fc1686 Test project: Enable netcore3.1 testing, switch win64 Snap7 and use custom port.
- Add netcoreapp3.1 target framework, allowing this to run on linux and macos as well.
- Switch windows snap7 DLL to 64bit version 1.4.2. This also improves UnitTest stability (reduces false positives) on the CI (including appveyor)
- Changing the port used for S7NetTests when communicating with Snap7 to a value > 1000 allows tests to run on Linux without elevated privileges.
2020-09-13 10:01:38 +02:00
Serge Camille
7035d22506 Convert UnitTest project to SDK project type. 2020-08-18 09:20:31 +02:00
Serge Camille
a1d87de2d9 Rename DTL to DateTimeLong 2020-08-17 19:14:28 +02:00
Serge Camille
5d59c8284d Add DTL type
Add new class Types.Dtl by taking the DateTime type and adjusting things.

Also add unit test with binary data calculated by hand. (Need to verify with actual S7 data)
2020-08-16 22:31:26 +02:00
Michael Croes
9a34b14e1e Tests/TypeTests: Add ClassTests from #178
Close #178.
2020-08-13 21:57:42 +02:00
Tim Verwaal
8dc89867e9 Extended PLCAddress.Parse method 2019-12-19 10:55:51 +01:00
Michael Croes
555d1e8956 Add unit test for Types.DateTime 2019-07-17 21:07:45 +02:00
Adam Oleksy
370fd6b3d9 Fix reading nested classes 2018-09-26 14:43:49 +02:00
Michael Croes
96efb9d56a Add tests for String.ToByteArray(...) 2018-07-11 22:07:34 +02:00
Michael Croes
2204ab360c Fix write stringex (#162)
* Add StringEx.ToByteArray(...)

* Add Serialization.SerializeDataItem(DataItem)

Supports StringEx VarType or offloads to SerializeValue method.

* Use SerializeDataItem in S7WriteMultiple

* Assume string length without header in StringEx.ToByteArray

VarTypeToByteLength already assumed that StringEx declared count for
the number of characters without the header, this now matches that
behavior.

* Add unit tests for StringEx conversions

* Fix incorrect value passed to Encoding.GetBytes

The length must actually be within string limits.
2018-07-11 09:47:43 +02:00
Michael Croes
0f151e4947 Add tests for ConnectionRequest 2018-06-27 21:24:23 +02:00
Michael Croes
5f220cd31f Fix default namespace in S7.Net.UnitTest 2018-06-27 21:09:11 +02:00
Thomas Jäger
8ac96162f9 Merge remote-tracking branch 'upstream/master' into tcpclient 2018-05-16 11:33:46 +02:00
Michele Cattafesta
b3458a8304 unit tests 2018-05-05 23:24:06 +01:00
Thomas Jäger
74af1c0da7 Change project to allow testing internal classes.
Add protocol tests
Simplify async tests
2018-04-19 15:08:52 +02:00
Thomas Jäger
f53a3bd320 Use TcpClient and implemnt async methods
Note: This keeps the old methods to be backward compatible.
Note: Unforntunatly a lot of whitespace fixes, refactoring and other trivial stuff is
included. It was to hard to split of in a seperate commit.

Note: Async methods does not use exactly the same structure/signature as the
existing methods. "Out" parameters like ReadClass and ReadStruct instead
returns the struct in tuple. Async methods also rely on exceptions
instead of ErrorCodes to communicate exception states to calling client.

* Use TcpClient and use Async methods (ReadAsync/WriteAsync)
* Implemnt async methods for all existing methods
* Implemnt existing methods using tcpclient.
* Split Plc.cs in more files. (Common, Async, Sync, Helpers)
* Mark old methods as Obsolete
* Split tests in two files
* Implement Async tests
2018-04-19 13:13:08 +02:00
Thomas Bargetz
07fe703b3d Classes with arrays can now be read/written from/to the plc 2017-08-07 11:51:58 +02:00
Thomas Bargetz
6328efbc5b Ignoring properties without a public setter or no setter at all 2017-07-07 10:57:12 +02:00
Michele Cattafesta
9108dbde51 documentation, cleanup and unit tests.
Signed-off-by: Michele Cattafesta <michele.cattafesta@mesta-automation.com>
2016-05-02 21:58:09 +02:00
Michele Cattafesta
9aa01a4aad Read/Write class and structs now handle more than 200 bytes with multiple requests (Issue #30 and Issue #27).
Signed-off-by: Michele Cattafesta <michele.cattafesta@mesta-automation.com>
2015-10-05 23:44:49 +02:00
Johnnyxy
533a18e2cc o changed target .NET framework to v3.5 (higher .NET versions can load and execute lower versions code)
x fixes compatibility to support .NET 3.5 (removed unused usings/imports and changed method calls to .NET equivalents)
2015-06-17 17:04:12 +02:00
Michele Cattafesta
73437f9ea3 Added Unit Tests.
Signed-off-by: Michele Cattafesta <michele.cattafesta@mesta-automation.com>
2014-12-22 14:31:52 +01:00