libNbiotCore/test/serial_test.cpp
// Tests if an nbiot string can be written to the buffer
Tests if an nbiot string can be written to the buffer
Tests if an nbiot string can be written to the buffer
TEST (SerialTest, WriteNbiotString) {
    Serial s;
    pSerCom = new MockSerialCom();
    s.configSetPutChar(writeByte);
    EXPECT_CALL(*pSerCom, writeByte('c'))
            .Times(4);
    nbiot::string my_string("cccc");
    EXPECT_EQ(4, s.write(my_string));
    EXPECT_EQ(((int) Serial::NoError), s.getError());
    delete (pSerCom);
}
TEST ( SerialTest , WriteNbiotString ) { Serial s ; pSerCom = new MockSerialCom ( ) ; s . configSetPutChar ( writeByte ) ; EXPECT_CALL ( * pSerCom , writeByte ( ' ' ) ) . Times ( 4 ) ; nbiot :: string my_string ( " " ) ; EXPECT_EQ ( 4 , s . write ( my_string ) ) ; EXPECT_EQ ( ( ( int ) Serial :: NoError ) , s . getError ( ) ) ; delete ( pSerCom ) ; }
Tests if an nbiot string can be written to the buffer
Tests if an nbiot string can be written to the buffer