Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » Test EGL Templates using EUnit
Test EGL Templates using EUnit [message #1034258] Fri, 05 April 2013 08:01 Go to next message
Patricia Fernández is currently offline Patricia FernándezFriend
Messages: 41
Registered: October 2012
Member
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 08:04]

Report message to a moderator

Re: Test EGL Templates using EUnit [message #1034293 is a reply to message #1034258] Fri, 05 April 2013 08:56 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 911
Registered: July 2009
Senior Member
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 08:59 Go to previous messageGo to next message
Patricia Fernández is currently offline Patricia FernándezFriend
Messages: 41
Registered: October 2012
Member
Thanks for the help Dimitris, I will check them.

Cheers.

[Updated on: Fri, 05 April 2013 09:10]

Report message to a moderator

Re: Test EGL Templates using EUnit [message #1034346 is a reply to message #1034295] Fri, 05 April 2013 10:26 Go to previous messageGo to next message
Antonio Garcia-Dominguez is currently offline Antonio Garcia-DominguezFriend
Messages: 309
Registered: January 2010
Senior Member
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 10:27]

Report message to a moderator

Re: Test EGL Templates using EUnit [message #1034467 is a reply to message #1034346] Fri, 05 April 2013 13:12 Go to previous messageGo to next message
Patricia Fernández is currently offline Patricia FernándezFriend
Messages: 41
Registered: October 2012
Member
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 18:02 Go to previous message
Antonio Garcia-Dominguez is currently offline Antonio Garcia-DominguezFriend
Messages: 309
Registered: January 2010
Senior Member
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 Nov 23 00:56:09 GMT 2014

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

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