summaryrefslogtreecommitdiff
path: root/platform/structuralsearch/testData/java/after1.java
diff options
context:
space:
mode:
Diffstat (limited to 'platform/structuralsearch/testData/java/after1.java')
-rw-r--r--platform/structuralsearch/testData/java/after1.java82
1 files changed, 82 insertions, 0 deletions
diff --git a/platform/structuralsearch/testData/java/after1.java b/platform/structuralsearch/testData/java/after1.java
new file mode 100644
index 000000000000..156cc38f997a
--- /dev/null
+++ b/platform/structuralsearch/testData/java/after1.java
@@ -0,0 +1,82 @@
+/*
+ * Created on Jan 30, 2004
+ *
+ */
+package somepackage;
+
+/**
+ * Title: ForecastSummaryReportTest
+ */
+public class ForecastSummaryReportTest extends SOTestCase {
+
+ ForecastSummaryReport oReport = null;
+ ScheduleGroupData oSkdgrp = null;
+ SODate oStart = null;
+ SODate oEnd = null;
+ SODateInterval oDateRange = null;
+
+
+ /**
+ * Constructor for ForecastSummaryReportTest.
+ *
+ * @param arg0
+ */
+ public ForecastSummaryReportTest(String arg0) {
+ super(arg0);
+ }
+
+ public static void main(String[] args) {
+ junit.textui.TestRunner.run(ForecastSummaryReportTest.class);
+ }
+
+ /*
+ * @see TestCase#setUp()
+ */
+ protected void setUp() throws Exception {
+ super.setUp();
+ try {
+ oSkdgrp = ScheduleGroupData.getScheduleGroupData(new Integer(1001));
+ oDateRange = new SODateInterval(new SODate("01/23/2004"), new SODate("01/30/2004"));
+ oReport = new ForecastSummaryReport(oSkdgrp.getCorporateEntity(), oDateRange);
+ } catch (Exception e) {
+ System.out.println("Unhandled exception in Setup:" + e);
+ fail();
+ }
+
+ }
+
+ /*
+ * @see TestCase#tearDown()
+ */
+ protected void tearDown() throws Exception {
+ super.tearDown();
+ oReport = null;
+ }
+
+ public void testForecastSummaryReport() {
+ try {
+ ForecastSummaryReport testReport = new ForecastSummaryReport(oSkdgrp.getCorporateEntity(), oDateRange);
+ assertNotNull(testReport);
+ } catch (RetailException e) {
+ e.printStackTrace();
+ fail("RetailException: Could not create ForecastSummaryReport(CorporateEntity, SODateInterval)");
+ }
+ }
+
+ public void testSetIncludeSublocationsFlag() {
+ oReport.setIncludeSublocationsFlag(true);
+ assertTrue(oReport.isIncludeSublocationsFlagSet());
+ }
+
+ public void testIsIncludeSublocationsFlagSet() {
+ oReport.setIncludeSublocationsFlag(false);
+ assertFalse(oReport.isIncludeSublocationsFlagSet());
+ oReport.setIncludeSublocationsFlag(true);
+ assertTrue(oReport.isIncludeSublocationsFlagSet());
+ }
+
+ public void testRefresh() throws RetailException {
+ oReport.refresh();
+ assertNotNull(oReport);
+ }
+}