-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(status holding): Handle messages with status holding.
When a message is read from PI with status holding the end time is null. Added handling for the holding status and allow null end times. null end times are sorted last in the message display. Started changes to ApplicationProperties.java to allow configuration for the maximum number of messages per WS call as well as the message initial start date on first run of the application. ApplicationProperties.java is updated - now need to refactor zpi_ejb to use the values instead of constants.
- Loading branch information
Showing
19 changed files
with
322 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 6 additions & 1 deletion
7
jaylin.com.au/zpi_ejb/_comp/.settings/org.eclipse.jdt.core.prefs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
Manifest-Version: 1.0 | ||
Class-Path: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
74 changes: 74 additions & 0 deletions
74
....com.au/zpi_ejb/_comp/test/au/com/jaylin/persistence/ejbs/ApplicationProperties_Test.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
package au.com.jaylin.persistence.ejbs; | ||
|
||
import java.util.Properties; | ||
|
||
import org.junit.Test; | ||
import org.junit.runner.RunWith; | ||
|
||
import org.mockito.Mock; | ||
import org.mockito.runners.MockitoJUnitRunner; | ||
import org.mockito.ArgumentCaptor; | ||
import org.mockito.InjectMocks; | ||
import org.mockito.Mock; | ||
import org.mockito.runners.MockitoJUnitRunner; | ||
|
||
import static org.junit.Assert.assertEquals; | ||
import static org.mockito.Matchers.any; | ||
import static org.mockito.Mockito.never; | ||
import static org.mockito.Mockito.times; | ||
import static org.mockito.Mockito.verify; | ||
import static org.mockito.Mockito.when; | ||
|
||
|
||
import javax.naming.InitialContext; | ||
import javax.naming.NamingException; | ||
|
||
import com.sap.engine.services.configuration.appconfiguration.ApplicationPropertiesAccess; | ||
import com.sap.engine.services.configuration.appconfiguration.ApplicationPropertiesChangeListener; | ||
|
||
|
||
@RunWith(MockitoJUnitRunner.class) | ||
public class ApplicationProperties_Test { | ||
|
||
@Mock | ||
InitialContext ctx; | ||
|
||
@InjectMocks | ||
ApplicationProperties appProperties; | ||
|
||
@Test | ||
public void testCreateApplicationProperties() throws NamingException { | ||
when((ApplicationPropertiesAccess)ctx.lookup("ApplicationConfiguration")).thenReturn(new ApplicationPropertiesAccess() { | ||
|
||
@Override | ||
public void removeApplicationPropertiesChangedListener( | ||
ApplicationPropertiesChangeListener arg0) { | ||
// TODO Auto-generated method stub | ||
|
||
} | ||
|
||
@Override | ||
public Properties getSystemProfile() { | ||
// TODO Auto-generated method stub | ||
return null; | ||
} | ||
|
||
@Override | ||
public Properties getApplicationProperties() { | ||
// build up test double for java properties object | ||
Properties p = new Properties(); | ||
p.setProperty("HOST_URL", "http://abc.company.com:50001"); | ||
return p; | ||
} | ||
|
||
@Override | ||
public void addApplicationPropertiesChangedListener( | ||
ApplicationPropertiesChangeListener arg0) { | ||
// TODO Auto-generated method stub | ||
|
||
} | ||
}); | ||
|
||
// String url = appProperties.getHostUrl(); | ||
} | ||
} |
Oops, something went wrong.