xtend nested scopes

41 views
Skip to first unread message

Manav Brar

unread,
Jan 20, 2016, 8:59:31 PM1/20/16
to Xtend Programming Language
I have runaway scope issue

When verify if agent name is empty skip to validate next agent

And verify validated agent list without name is not empty

And verify agent migration flag is valid

[INFO] user profile id 2319

[INFO] user profile id 3554

[INFO] user profile id 1439

[INFO] user profile id 5142

[INFO] user profile id 7767

[INFO] matched user profile 7767 should equal z id 7767

[INFO] matched user profile 7767 should equal z id 7767

[INFO] matched user profile 7767 should equal z id 7767

[INFO] matched user profile 7767 should equal z id 7767

[INFO] matched user profile 7767 should equal z id 7767

Then verify the mailbox matches agent name


I can't seem to capture the scope on outer val on the inner lambda

@Then("verify the mailbox matches agent name"

def void verifyTheMailMatchesAgentName() {

crmInstance.validAgent.forEach [ x |

{

LOGGER.info('''user profile id «x.partnerId»''')

val z = x

crmInstance.UData.forEach [ y |

{

val s = y.data.zuid.toString

val part = z.partnerId

val bind = z

if (part == s) {

val removeSpace = crmMigrationImpl.matchPfrofileName(y)

.data

.name.toLowerCase

LOGGER.info('''matched user profile «part» should equal z id «s»''')

try {

assertThat(removeSpace, notNullValue)

assertThat(

bind.mailbox,

equalTo(removeSpace.replaceAll("[^a-zA-Z0-9]", ""))

)

} catch (AssertionError ae) {

throw new AssertionError(ae.getMessage, ae.getCause)

}

}

}

]

}

]

}

Sven Efftinge (sven@efftinge.de)

unread,
Jan 21, 2016, 1:59:54 AM1/21/16
to xtend...@googlegroups.com
Could you please ask a question and point us to the actual problem?
Also reducing the scenario to a standalone snippet so that it doesn't involve API we don't have would be good.

--
You received this message because you are subscribed to the Google Groups "Xtend Programming Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xtend-lang+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages