Skip to main content



      Home
Home » Modeling » Epsilon » Test EGL Templates using EUnit
Test EGL Templates using EUnit [message #1034258] Fri, 05 April 2013 04:01 Go to next message
Eclipse UserFriend
Hello,

I'm new to EUnit. I read the documentation in the Epsilon manual and took a look at the examples, but I'm a bit lost and I'm not sure if EUnit fits what I need to test, as I couldn't find a similar example. Here is a simplified version of what I'm looking for:

Given a UML model, and going through a bunch of egl templates, I generate C# code. What I need to test is if the given classes from the model have name and if they don't, my template should throw an exception.

The way I've been testing this until now was changing the original model and forcing the exception creating a class without name, but I wonder if I could do it using EUnit.

Thanks in advance.

[Updated on: Fri, 05 April 2013 04:04] by Moderator

Re: Test EGL Templates using EUnit [message #1034293 is a reply to message #1034258] Fri, 05 April 2013 04:56 Go to previous messageGo to next message
Eclipse UserFriend
Hi Patricia,

The following EUnit examples may help:

https://dev.eclipse.org/svnroot/modeling/org.eclipse.epsilon/trunk/examples/org.eclipse.epsilon.eunit.examples.egl.dirs
https://dev.eclipse.org/svnroot/modeling/org.eclipse.epsilon/trunk/examples/org.eclipse.epsilon.eunit.examples.egl.files

Cheers,
Dimitris
Re: Test EGL Templates using EUnit [message #1034295 is a reply to message #1034293] Fri, 05 April 2013 04:59 Go to previous messageGo to next message
Eclipse UserFriend
Thanks for the help Dimitris, I will check them.

Cheers.

[Updated on: Fri, 05 April 2013 05:10] by Moderator

Re: Test EGL Templates using EUnit [message #1034346 is a reply to message #1034295] Fri, 05 April 2013 06:26 Go to previous messageGo to next message
Eclipse UserFriend
The existing assertions on files are stronger than what you might want, as they test for file/directory equality instead of checking for a particular substring.

If you need assertions for checking that some line of a file matches a certain regular expression or something of the sort, please report an enhancement request here:

https://bugs.eclipse.org/bugs/enter_bug.cgi?product=EMFT.Epsilon

[Updated on: Fri, 05 April 2013 06:27] by Moderator

Re: Test EGL Templates using EUnit [message #1034467 is a reply to message #1034346] Fri, 05 April 2013 09:12 Go to previous messageGo to next message
Eclipse UserFriend
Antonio Garcia-Dominguez wrote on Fri, 05 April 2013 06:26
The existing assertions on files are stronger than what you might want, as they test for file/directory equality instead of checking for a particular substring.

If you need assertions for checking that some line of a file matches a certain regular expression or something of the sort, please report an enhancement request here:

https://bugs.eclipse.org/bugs/enter_bug.cgi?product=EMFT.Epsilon

Hi Antonio,

Just reported it, thanks.
Re: Test EGL Templates using EUnit [message #1034642 is a reply to message #1034467] Fri, 05 April 2013 14:02 Go to previous message
Eclipse UserFriend
Thanks! For the record, the enhancement request reported by Patricia was:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=405001
Previous Topic:[Flock] UnresolvedReference
Next Topic:EVL
Goto Forum:
  


Current Time: Sun Jul 06 11:20:14 EDT 2025

Powered by FUDForum. Page generated in 0.04523 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top