use of com.microsoft.azure.sdk.iot.service.devicetwin.Pair in project azure-iot-sdk-java by Azure.
the class PairTest method constructorCreatesNewPair.
/*
**Tests_SRS_Pair_25_001: [**The constructor shall save the key and value representing this Pair.**]**
*/
@Test
public void constructorCreatesNewPair() {
//act
Pair testPair = new Pair("TestKey", "TestObject");
//assert
assertNotNull(testPair);
assertTrue(testPair.getKey().equals("TestKey"));
assertTrue(testPair.getValue().equals("TestObject"));
}
use of com.microsoft.azure.sdk.iot.service.devicetwin.Pair in project azure-iot-sdk-java by Azure.
the class PairTest method setValueSets.
/*
**Tests_SRS_Pair_25_006: [**The function shall overwrite the new value for old and return old value.**]**
*/
@Test
public void setValueSets() {
//arrange
Pair testPair = new Pair("TestKey", "TestObject");
//act
testPair.setValue("newTestObject");
//assert
Object value = testPair.getValue();
assertNotNull(testPair);
assertTrue(value.equals("newTestObject"));
}
Aggregations