Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » General (non-technical) » Test » Handler and Integration Test
Handler and Integration Test [message #481486] Fri, 21 August 2009 08:43 Go to next message
RCH is currently offline RCHFriend
Messages: 6
Registered: July 2009
Junior Member
Hi,

First Thanks for reading this post.

I created an Handler class which deletes model elements from my tree
navigator. It semms to work well. Now I'm trying to write an integration
test for my Handler class. Therefore I used JUnit. I have basic knowledge
in JUnit but i never tested a Handler before. Wenn I start my test, i will
get a lot of NullPointExceptions.

For example that method in the class EMFTransactionPlugin causes an
Exception because getPlugin() returns null.
public static String getPluginId() {
return getPlugin().getBundle().getSymbolicName();
}

It is easy to understand because the whole UI interaction is missing in my
test.

Now my question.
How can I create an integration test for handlers unsing Junit? Can
somebody please help me, maybe there is a tutorial?

Thank you very much!

RCH
Re: Handler and Integration Test [message #481611 is a reply to message #481486] Fri, 21 August 2009 20:11 Go to previous message
Eric Rizzo is currently offline Eric RizzoFriend
Messages: 3070
Registered: July 2009
Senior Member
FYI, this group is a "sandbox" for testing your ability to post
messages; it is not for technical discussions relating to testing.
You question would be better placed on the eclipse.platform group.

Eric


RCH wrote:
> Hi,
>
> First Thanks for reading this post.
>
> I created an Handler class which deletes model elements from my tree
> navigator. It semms to work well. Now I'm trying to write an integration
> test for my Handler class. Therefore I used JUnit. I have basic
> knowledge in JUnit but i never tested a Handler before. Wenn I start my
> test, i will get a lot of NullPointExceptions.
>
> For example that method in the class EMFTransactionPlugin causes an
> Exception because getPlugin() returns null. public static String
> getPluginId() {
> return getPlugin().getBundle().getSymbolicName();
> }
> It is easy to understand because the whole UI interaction is missing in
> my test.
>
> Now my question.
> How can I create an integration test for handlers unsing Junit? Can
> somebody please help me, maybe there is a tutorial?
> Thank you very much!
>
> RCH
>
Re: Handler and Integration Test [message #568118 is a reply to message #481486] Fri, 21 August 2009 20:11 Go to previous message
Eric Rizzo is currently offline Eric RizzoFriend
Messages: 3070
Registered: July 2009
Senior Member
FYI, this group is a "sandbox" for testing your ability to post
messages; it is not for technical discussions relating to testing.
You question would be better placed on the eclipse.platform group.

Eric


RCH wrote:
> Hi,
>
> First Thanks for reading this post.
>
> I created an Handler class which deletes model elements from my tree
> navigator. It semms to work well. Now I'm trying to write an integration
> test for my Handler class. Therefore I used JUnit. I have basic
> knowledge in JUnit but i never tested a Handler before. Wenn I start my
> test, i will get a lot of NullPointExceptions.
>
> For example that method in the class EMFTransactionPlugin causes an
> Exception because getPlugin() returns null. public static String
> getPluginId() {
> return getPlugin().getBundle().getSymbolicName();
> }
> It is easy to understand because the whole UI interaction is missing in
> my test.
>
> Now my question.
> How can I create an integration test for handlers unsing Junit? Can
> somebody please help me, maybe there is a tutorial?
> Thank you very much!
>
> RCH
>
Previous Topic:Handler and Integration Test
Next Topic:Test
Goto Forum:
  


Current Time: Sun Sep 22 03:20:00 GMT 2024

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

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

Back to the top