[−][src]Struct serial_unit_testing::tests::test_case::TestCase
Test representing a check on the serial.
Fields
settings: TestCaseSettings
Settings to use for the test.
input_format: TextFormat
Text format of the input send to the serial.
output_format: TextFormat
Text format of the response received by the serial.
Methods
impl TestCase
[src]
pub fn new(name: String, input: String, output: String) -> TestCase
[src]
Create a new test.
pub fn run(&mut self, serial: &mut Serial) -> Result<bool, String>
[src]
Execute the test on given serial port.
After running the test response and successful are set if no error occurred.
pub fn is_successful(&self) -> Option<bool>
[src]
Check if the test was successful.
If the test was not run before None will be returned.
pub fn error(&self) -> Option<String>
[src]
Get the error from running the test.
If the test was not run before or no error occurred None will be returned.
Trait Implementations
Auto Trait Implementations
impl Send for TestCase
impl Sync for TestCase
impl Unpin for TestCase
impl UnwindSafe for TestCase
impl RefUnwindSafe for TestCase
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,