Fixed tester project
This commit is contained in:
parent
f7a200c8b2
commit
819f527663
@ -17,9 +17,10 @@
|
||||
<PackageIconUrl />
|
||||
<LangVersion>latest</LangVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Properties\" />
|
||||
<Compile Remove="Properties\**" />
|
||||
<EmbeddedResource Remove="Properties\**" />
|
||||
<None Remove="Properties\**" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
@ -1,8 +1,8 @@
|
||||
using System;
|
||||
using System.IO.Ports;
|
||||
using System.Text;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using System.Threading;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using Nefarius.Peripherals.SerialPort;
|
||||
|
||||
namespace PInvokeSerialPort.Test
|
||||
{
|
||||
@ -13,9 +13,9 @@ namespace PInvokeSerialPort.Test
|
||||
[TestClass]
|
||||
public class PInvokeSerialPortTest
|
||||
{
|
||||
dynamic _sender;
|
||||
dynamic _reciever;
|
||||
StringBuilder _stringBuilder;
|
||||
private dynamic _reciever;
|
||||
private dynamic _sender;
|
||||
private StringBuilder _stringBuilder;
|
||||
|
||||
public void OpenWriteDoWaitClose(Action action)
|
||||
{
|
||||
@ -66,7 +66,8 @@ namespace PInvokeSerialPort.Test
|
||||
|
||||
OpenWriteDoWaitClose(() =>
|
||||
{
|
||||
((System.IO.Ports.SerialPort)_reciever).DataReceived += (x, y) => _stringBuilder.Append(_reciever.ReadExisting());
|
||||
((System.IO.Ports.SerialPort)_reciever).DataReceived +=
|
||||
(x, y) => _stringBuilder.Append(_reciever.ReadExisting());
|
||||
});
|
||||
}
|
||||
|
||||
@ -78,7 +79,8 @@ namespace PInvokeSerialPort.Test
|
||||
|
||||
OpenWriteDoWaitClose(() =>
|
||||
{
|
||||
((System.IO.Ports.SerialPort)_reciever).DataReceived += (x, y) => _stringBuilder.Append(_reciever.ReadExisting());
|
||||
((System.IO.Ports.SerialPort)_reciever).DataReceived +=
|
||||
(x, y) => _stringBuilder.Append(_reciever.ReadExisting());
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user