summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorleonid lokhmatov, Luxoft <zaqqqqqqqq@gmail.com>2020-12-24 03:58:01 +0200
committerleonid lokhmatov, Luxoft <zaqqqqqqqq@gmail.com>2020-12-24 03:58:01 +0200
commitdb95ed39705b2fcf7e5901f2d7900c4746848e88 (patch)
tree30cd755c63d7aa93c3c79b8e9881f9da55aef746
parent45f2ade907d2f2458f528efb6f1042a466c7053a (diff)
downloadsdl_ios-db95ed39705b2fcf7e5901f2d7900c4746848e88.tar.gz
[0296] 'upd video stream cap': implement additional Image Resolution tests to make Codecov happy (3).
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLImageResolutionSpec.m22
1 files changed, 17 insertions, 5 deletions
diff --git a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLImageResolutionSpec.m b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLImageResolutionSpec.m
index 8bacdab56..93adb7eef 100644
--- a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLImageResolutionSpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLImageResolutionSpec.m
@@ -6,8 +6,11 @@
QuickSpecBegin(SDLImageResolutionSpec)
-describe(@"Getter/Setter Tests", ^ {
- it(@"Should set and get correctly", ^ {
+const uint16_t width = 234;
+const uint16_t height = 567;
+
+describe(@"Getter/Setter Tests", ^{
+ it(@"Should set and get correctly", ^{
SDLImageResolution *testStruct = [[SDLImageResolution alloc] init];
testStruct.resolutionWidth = @245;
@@ -24,7 +27,7 @@ describe(@"Getter/Setter Tests", ^ {
expect(testStruct.resolutionWidth).to(equal(@1245));
});
- it(@"Should get correctly when initialized", ^ {
+ it(@"Should get correctly when initialized", ^{
NSDictionary *dict = @{SDLRPCParameterNameResolutionHeight:@69,
SDLRPCParameterNameResolutionWidth:@869,
};
@@ -34,13 +37,22 @@ describe(@"Getter/Setter Tests", ^ {
expect(testStruct.resolutionHeight).to(equal(@69));
});
- it(@"Should return nil if not set", ^ {
+ it(@"Should return nil if not set", ^{
SDLImageResolution *testStruct = [[SDLImageResolution alloc] init];
expect(testStruct.resolutionHeight).to(beNil());
expect(testStruct.resolutionWidth).to(beNil());
});
-});
+ context(@"initWithWidth:height:", ^{
+ SDLImageResolution *testStruct = [[SDLImageResolution alloc] initWithWidth:width height:height];
+ SDLImageResolution *copyStruct = [testStruct copy];
+ it(@"copy ant equal test", ^{
+ expect(testStruct).notTo(beNil());
+ expect(copyStruct).notTo(beNil());
+ expect(copyStruct).to(equal(testStruct));
+ });
+ });
+});
QuickSpecEnd