# -*- coding: utf-8 -*- ## # Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. # copyright # THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, # IN PART OR IN WHOLE, # WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. # # file tst_Treatment_LoadCellReadings # date 2020/06/21 # author Behrouz NematiPour # import names import utils import denaliMessages def gotoScreenNtest_Contains_LoadCellReadings(): mouseClick(waitForObject(names.o_mainMenu_manager)) test_values(0, 0, 0, 0) def test_values(vRs1Prim, vRs1Bkup, vRs2Prim, vRs2Bkup): test.compare(str(waitForObjectExists(names.o_managerHome_reservoir1Prim).text), "{:.2f}".format(vRs1Prim)) test.compare(str(waitForObjectExists(names.o_managerHome_reservoir1Bkup).text), "{:.2f}".format(vRs1Bkup)) test.compare(str(waitForObjectExists(names.o_managerHome_reservoir2Prim).text), "{:.2f}".format(vRs2Prim)) test.compare(str(waitForObjectExists(names.o_managerHome_reservoir2Bkup).text), "{:.2f}".format(vRs2Bkup)) def main(): utils.tstStart() startApplication(names.AUT_NAME) utils.waitForGUI(1) gotoScreenNtest_Contains_LoadCellReadings() utils.waitForGUI(1) step = 10 for i in range ( 10, 500, step): denaliMessages.setTreatmentLoadCellReadings(i, i + step * 1 , i + step * 2, i + step * 3) test_values (i, i + step * 1 , i + step * 2, i + step * 3) denaliMessages.setTreatmentLoadCellReadings(100, 200, 300, 400) test_values (100, 200, 300, 400) denaliMessages.setTreatmentLoadCellReadings(100, 200, 300, 400) # Coverage test_values (100, 200, 300, 400) denaliMessages.setTreatmentLoadCellReadings(0, 0, 0, 0) test_values (0, 0, 0, 0) utils.tstDone()