Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » PHP Development Tools (PDT) » Unit Testing
Unit Testing [message #1004072] Tue, 22 January 2013 14:34 Go to next message
junior developer is currently offline junior developerFriend
Messages: 354
Registered: January 2013
Senior Member
hi,
After ı run my grammar ,new eclipse instance open .I create test.dmodel under src folder.My model element has occured under scr-gen.Everything okay so far .I test my model with unit test.I cerate xtend class under src folder in the java same java project.(java project name is my.company ,ı create xtend class in here.)I do 15 minutes example- extended .ParserTest my xtend class name.but ı do not understand package name.
I build unit test class ?
import org.eclipse.xtext.junit4.XtextRunner
import org.eclipse.xtext.example.domainmodel.DomainmodelInjectorProvider

@InjectWith(typeof(DomainmodelInjectorProvider))
@RunWith(typeof(XtextRunner))
class ParserTest {
}

ı take error:
Couldn't resolve reference to JvmType 'org.eclipse.xtext.junit4.XtextRunner'.
Couldn't resolve reference to JvmType 'org.eclipse.xtext.example.domainmodel.DomainmodelInjectorProvider'.
Re: Unit Testing [message #1005139 is a reply to message #1004072] Thu, 24 January 2013 14:48 Go to previous messageGo to next message
junior developer is currently offline junior developerFriend
Messages: 354
Registered: January 2013
Senior Member

I solved this problem

[Updated on: Fri, 25 January 2013 06:51]

Report message to a moderator

Re: Unit Testing [message #1014136 is a reply to message #1004072] Mon, 25 February 2013 08:40 Go to previous messageGo to next message
Dan Tololoi is currently offline Dan TololoiFriend
Messages: 33
Registered: September 2012
Location: Iasi, Romania
Member

Can you also put a solution? I am facing same issue, the dependency to the junit4 is already added to META-INF but still the type is not found. Thanks
Re: Unit Testing [message #1014261 is a reply to message #1004072] Mon, 25 February 2013 13:16 Go to previous message
Dan Tololoi is currently offline Dan TololoiFriend
Messages: 33
Registered: September 2012
Location: Iasi, Romania
Member

I was trying to get the junit4 import not in the mentioned path from the tutorial but in the Eclipse instance that used dmodel. So pay attention as I didn't that the test must be placed in the src folder for org.example.domainmodel.tests
Previous Topic:"Debug all pages" option not showing.
Next Topic:Eclipse Juno + Remote System Explorer + PDT = no default proposals
Goto Forum:
  


Current Time: Sat Apr 20 03:07:37 GMT 2024

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

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

Back to the top