Skip to content
Permalink
Browse files

[xUnitTestGeneration] updating Parser grammer rules and the analysis

  • Loading branch information...
SultanEid committed Sep 19, 2019
1 parent 40ea68f commit f5087179dec9dff1915b966a2aa55402b0479604
@@ -3,25 +3,25 @@ class UmpleTToJUnit {
members_AllAssertions <<!<</*members_AllAssertions*/>><<#


if(as.getType().equals("AssertTrue"))
if(as.getType().equals("assertTrue"))
{
#>>
Assert.assertTrue (<<=as.getAssertCode()>>);
<<#}

if(as.getType().equals("AssertFalse"))
if(as.getType().equals("assertFalse"))
{#>>
Assert.assertFalse (<<=as.getAssertCode()>>);<<#}

if(as.getType().equals("AssertEqual"))
if(as.getType().equals("assertEqual"))
{#>>
Assert.assertEqual (<<=as.getAssertCode()>>);<<#}

if(as.getType().equals("AssertNull"))
if(as.getType().equals("assertNull"))
{#>>
Assert.assertNull (<<=as.getAssertCode()>>);<<#}

if(as.getType().equals("AssertMethod"))
if(as.getType().equals("assertMethod"))
{#>>
UmpleAssert.assertMethod (<<=as.getAssertCode()>>);<<#}
#>>
@@ -32,9 +32,10 @@ for (TestCase tc : model.getTestSuite(0).getTestcases())
for ( Action act : tc.getActions())
{
if (act.getLocOrder() == i)
{
#>> //include Action Code if there is actions in a TestCAse
<<=act.getCode()>><<#
{//include Action Code if there is actions in a TestCAse
#>>
<<=act.getCode()>>
<<#
}

}
@@ -3,25 +3,25 @@ class UmpleTToPhpUnit {
members_AllAssertions <<!<</*members_AllAssertions*/>><<#


if(as.getType().equals("AssertTrue"))
if(as.getType().equals("assertTrue"))
{
#>>
$this->assertTrue(<<=as.getAssertCode()>>);
<<#}

if(as.getType().equals("AssertFalse"))
if(as.getType().equals("assertFalse"))
{#>>
$this->assertFalse(<<=as.getAssertCode()>>);<<#}

if(as.getType().equals("AssertEqual"))
if(as.getType().equals("assertEqual"))
{#>>
$this->assertEqual(<<=as.getAssertCode()>>);<<#}

if(as.getType().equals("AssertNull"))
if(as.getType().equals("assertNull"))
{#>>
$this->assertNull(<<=as.getAssertCode()>>);<<#}

if(as.getType().equals("AssertMethod"))
if(as.getType().equals("assertMethod"))
{#>>
$this->assertMethod(<<=as.getAssertCode()>>);<<#}
#>>
@@ -32,7 +32,7 @@ for (TestCase tc : model.getTestSuite(0).getTestcases())
{
if (act.getLocOrder() == i)
{
#>> //include Action Code if there is actions in a TestCAse
#>>
<<=act.getCode()>><<#
}

@@ -42,7 +42,7 @@ for (TestCase tc : model.getTestSuite(0).getTestcases())


if (tc.hasAssertions())
{
{
for (Assertion as: tc.getAssertions())
{
if (as.getLocOrder() ==i)
@@ -2,23 +2,23 @@
class UmpleTToRubyUnit {
members_AllAssertions <<!<</*members_AllAssertions*/>> <<#

if(as.getType().equals("AssertTrue"))
if(as.getType().equals("assertTrue"))
{#>>
assert(<<=as.getAssertCode()>>)<<#}

if(as.getType().equals("AssertFalse"))
if(as.getType().equals("assertFalse"))
{#>>
assert(!<<=as.getAssertCode()>>)<<#}

if(as.getType().equals("AssertEqual"))
if(as.getType().equals("assertEqual"))
{#>>
assert_equal (<<=as.getAssertCode()>>)<<#}

if(as.getType().equals("AssertNull"))
if(as.getType().equals("assertNull"))
{#>>
assert_nil(<<=as.getAssertCode()>>)<<#}

if(as.getType().equals("AssertMethod"))
if(as.getType().equals("assertMethod"))
{#>>
assert_method (<<=as.getAssertCode()>>)<<#}
#>>

0 comments on commit f508717

Please sign in to comment.
You can’t perform that action at this time.