import { expect } from "chai" ; import { UnpackParametersFromBytesScenario } from "../scenarios/index" ; import { ERC721CollateralizedSimpleInterestTermsContractContract as TermsContract , } from "../../../../../../types/generated/e_r_c721_collateralized_simple_interest_terms_contract" ; export class UnpackParametersFromBytesRunner { private collateralizedSimpleInterestTermsContract : TermsContract ; constructor ( ) { this . testScenario = this . testScenario . bind ( this ) ; } public initialize ( collateralizedSimpleInterestTermsContract ) { this . collateralizedSimpleInterestTermsContract = collateralizedSimpleInterestTermsContract ; } public testScenario ( scenario ) { describe ( `when given ${ scenario . input }` , ( ) => { it ( `should return ${ JSON . stringify ( scenario . expectedTerms ) }` , async ( ) => { const result = await this . collateralizedSimpleInterestTermsContract . unpackParametersFromBytes . callAsync ( scenario . input ) ; const resultString = JSON . stringify ( result ) ; const expectedValuesString = JSON . stringify ( Object . values ( scenario . expectedTerms ) ) ; expect ( resultString ) . to . equal ( expectedValuesString ) ; } ) ; } ) ; } }