File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,14 +6,13 @@ namespace UnitTestOpcDa;
66
77using BootstrapBlazor . OpcDa ;
88using Microsoft . Extensions . DependencyInjection ;
9- using Opc . Da ;
109using System . Runtime . Versioning ;
1110
1211[ SupportedOSPlatform ( "windows" ) ]
1312public class UnitTest1
1413{
1514 [ Fact ]
16- public void Read_Ok ( )
15+ public void Write_Ok ( )
1716 {
1817 var sc = new ServiceCollection ( ) ;
1918 sc . AddOpcServer ( ) ;
@@ -26,7 +25,14 @@ public void Read_Ok()
2625
2726 var values = server . Read ( "Simulation Examples.Functions.Ramp1" , "Simulation Examples.Functions.Ramp2" ) ;
2827 Assert . Equal ( 2 , values . Count ) ;
29- Assert . All ( values , v => Assert . Equal ( BootstrapBlazor . OpcDa . Quality . Good , v . Quality ) ) ;
28+ Assert . All ( values , v => Assert . Equal ( Quality . Good , v . Quality ) ) ;
29+
30+ var results = server . Write ( new OpcWriteItem ( )
31+ {
32+ Name = "Channel1.Device1.Tag3" ,
33+ Value = 123
34+ } ) ;
35+ Assert . All ( results , v => Assert . True ( v . Result ) ) ;
3036
3137 server . Disconnect ( ) ;
3238 Assert . False ( server . IsConnected ) ;
You can’t perform that action at this time.
0 commit comments