Adding new passing tests.
[phpeclipse.git] / net.sourceforge.phpeclipse.xdebug.test / src / net / sourceforge / phpeclipse / xdebug / php / launching / PHPSourceLookupParticipantTest.java
1 package net.sourceforge.phpeclipse.xdebug.php.launching;
2
3 import net.sourceforge.phpeclipse.xdebug.php.model.XDebugStackFrame;
4 import net.sourceforge.phpeclipse.xdebug.php.model.XDebugThread;
5
6 import org.eclipse.core.runtime.CoreException;
7
8 import junit.framework.TestCase;
9
10 public class PHPSourceLookupParticipantTest extends TestCase {
11
12         public void testFindSourceElementsObject() throws CoreException {
13                 PHPSourceLookupParticipant psp = new PHPSourceLookupParticipant();
14                 Object[] findSourceElements = psp.findSourceElements(new Object());
15                 assertTrue("array should be empty",findSourceElements.length == 0);
16         }
17         
18         public void testFindSourceElementsObject_WithNull() throws CoreException {
19                 PHPSourceLookupParticipant psp = new PHPSourceLookupParticipant();
20                 Object[] findSourceElements = psp.findSourceElements(null);
21                 assertTrue("array should be empty",findSourceElements.length == 0);
22         }
23         public void testFindSourceElementsObject_WithXdebugStackFrame() throws CoreException {
24                 PHPSourceLookupParticipant psp = new PHPSourceLookupParticipant();
25                 XDebugStackFrame frame = new MockXDebugStackFrame();
26                 Object[] findSourceElements = psp.findSourceElements(frame);
27                 assertTrue("array should be empty",findSourceElements.length == 0);
28         }
29         
30         class MockXDebugStackFrame extends XDebugStackFrame {
31                 public MockXDebugStackFrame() {
32                         super(null, 0);
33                 }
34         }
35         
36         public void testGetSourceName() throws CoreException {
37                 PHPSourceLookupParticipant psp = new PHPSourceLookupParticipant();
38                 psp.getSourceName(null);
39         }
40 }
41