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 09:34 Go to next message
junior developer is currently offline junior developer
Messages: 335
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 09:48 Go to previous messageGo to next message
junior developer is currently offline junior developer
Messages: 335
Registered: January 2013
Senior Member

I solved this problem

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

Report message to a moderator

Re: Unit Testing [message #1014136 is a reply to message #1004072] Mon, 25 February 2013 03:40 Go to previous messageGo to next message
Dan Tololoi is currently offline Dan Tololoi
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 08:16 Go to previous message
Dan Tololoi is currently offline Dan Tololoi
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: Tue Jul 22 11:38:08 EDT 2014

Powered by FUDForum. Page generated in 0.01743 seconds