RadioNetworkInformationAPI.robot 1.85 KB
Newer Older
Yann Garcia's avatar
Yann Garcia committed
*** Settings ***
Resource    ../environment/variables.txt
Resource    ../../../../pics.txt
Resource    ../../../../GenericKeywords.robot
Yann Garcia's avatar
Yann Garcia committed
Library    REST    ${MEC-APP_SCHEMA}://${MEC-APP_HOST}:${MEC-APP_PORT}    ssl_verify=false
Library    JSONSchemaLibrary    schemas/


*** Keywords ***
Check Subscription
    [Arguments]    ${received_value}    ${expected_value}
    Should Be Equal    ${received_value['_links']['self']}    ${LINKS_SELF}
Elian Kraja's avatar
Elian Kraja committed
    ${length}    Get Length    ${received_value['subscription']}
    :FOR  ${item}  IN RANGE    0    ${length} 
    \  Exit For Loop If    ${received_value['subscription'][${item}]} == ${expected_value}
    Log    Item found ${received_value['subscription'][${item}]}
    [return]    ${received_value['subscription'][${item}]}


Check CellChangeSubscription
    [Arguments]    ${received_value}
    Should Be Equal    ${received_value['_links']['self']['href']}    ${LINKS_SELF}
Yann Garcia's avatar
Yann Garcia committed


Check RabInfo
    [Arguments]    ${received_value}
Yann Garcia's avatar
Yann Garcia committed
    log    ${received_value}
Elian Kraja's avatar
Elian Kraja committed
    Should Not Be Empty    ${received_value['requestId']}
Michele Carignani's avatar
Michele Carignani committed
    Run Keyword If    'cellUserInfo' in ${received_value}    Should Be Equal As Strings    ${received_value['cellUserInfo'][0]['ecgi']['cellId']}    ${CELL_ID}
Yann Garcia's avatar
Yann Garcia committed

Check PlmnInfo
    [Arguments]    ${received_value}
Yann Garcia's avatar
Yann Garcia committed
    log    ${received_value}
Elian Kraja's avatar
Elian Kraja committed
    Should Be Equal As Strings   ${received_value['appInstanceId']}    ${APP_INS_ID}
    Should Not Be Empty    ${received_value['plmn'][0]['mcc']}    
    Should Not Be Empty    ${received_value['plmn'][0]['mnc']}    
Yann Garcia's avatar
Yann Garcia committed


Check S1BearerInfo
    [Arguments]    ${received_value}
    log    ${received_value}
Elian Kraja's avatar
Elian Kraja committed
    Should Be Equal As Strings    ${received_value['s1UeIffo']['ecgi']['cellId']}    ${CELL_ID}
    
Check L2MeasInfo
    [Arguments]    ${received_value}
    log    ${received_value}
Michele Carignani's avatar
Michele Carignani committed
    Should Be Equal As Strings    ${received_value['cellInfo'][0]['ecgi']['cellId']}    ${CELL_ID}