forked from SolidSoils/Arduino
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Integration tests completed for FindSerialConnection methods.
- Loading branch information
Henk van Boeijen
committed
Feb 11, 2015
1 parent
cb63365
commit 8d7f9e6
Showing
12 changed files
with
117 additions
and
30 deletions.
There are no files selected for viewing
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
using Microsoft.VisualStudio.TestTools.UnitTesting; | ||
|
||
using Solid.Arduino; | ||
|
||
namespace Solid.Arduino.Test | ||
{ | ||
[TestClass] | ||
public class EnhancedSerialConnectionTester | ||
{ | ||
[TestMethod] | ||
public void EnhancedSerialConnection_Constructor_WithoutParameters() | ||
{ | ||
var connection = new EnhancedSerialConnection(); | ||
Assert.AreEqual(100, connection.ReadTimeout); | ||
Assert.AreEqual(100, connection.WriteTimeout); | ||
Assert.AreEqual(115200, connection.BaudRate); | ||
} | ||
|
||
[TestMethod] | ||
public void EnhancedSerialConnection_Constructor_WithParameters() | ||
{ | ||
var connection = new EnhancedSerialConnection("COM1", SerialBaudRate.Bps_115200); | ||
Assert.AreEqual(100, connection.ReadTimeout); | ||
Assert.AreEqual(100, connection.WriteTimeout); | ||
Assert.AreEqual(115200, connection.BaudRate); | ||
} | ||
|
||
[TestMethod] | ||
public void EnhancedSerialConnection_OpenAndClose() | ||
{ | ||
var connection = new EnhancedSerialConnection(); | ||
connection.Open(); | ||
connection.Close(); | ||
} | ||
|
||
[TestMethod] | ||
public void EnhancedSerialConnection_OpenAndDoubleClose() | ||
{ | ||
var connection = new EnhancedSerialConnection(); | ||
connection.Open(); | ||
connection.Close(); | ||
connection.Close(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters