lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [6153] Add wx_test_existing_illustration helper class


From: Greg Chicares
Subject: [lmi-commits] [6153] Add wx_test_existing_illustration helper class
Date: Fri, 27 Mar 2015 00:32:17 +0000

Revision: 6153
          http://svn.sv.gnu.org/viewvc/?view=rev&root=lmi&revision=6153
Author:   chicares
Date:     2015-03-27 00:32:16 +0000 (Fri, 27 Mar 2015)
Log Message:
-----------
Add wx_test_existing_illustration helper class

Modified Paths:
--------------
    lmi/trunk/ChangeLog
    lmi/trunk/wx_test_document.hpp

Modified: lmi/trunk/ChangeLog
===================================================================
--- lmi/trunk/ChangeLog 2015-03-27 00:27:16 UTC (rev 6152)
+++ lmi/trunk/ChangeLog 2015-03-27 00:32:16 UTC (rev 6153)
@@ -35954,3 +35954,9 @@
 Move and rename class wx_test_new_document_base. See:
   http://lists.nongnu.org/archive/html/lmi/2015-03/msg00043.html
 
+20150327T0032Z <address@hidden> [516]
+
+  wx_test_document.hpp
+Add wx_test_existing_illustration helper class. See:
+  http://lists.nongnu.org/archive/html/lmi/2015-03/msg00043.html
+

Modified: lmi/trunk/wx_test_document.hpp
===================================================================
--- lmi/trunk/wx_test_document.hpp      2015-03-27 00:27:16 UTC (rev 6152)
+++ lmi/trunk/wx_test_document.hpp      2015-03-27 00:32:16 UTC (rev 6153)
@@ -136,4 +136,31 @@
     bool opened_;
 };
 
+/// Represents an existing illustration document.
+///
+/// Instantiating an object of this class simulates opening the specified
+/// illustration. Its close() method must be called before destroying an object
+/// of this class to ensure that it doesn't stay open.
+
+class wx_test_existing_illustration
+    :public wx_test_document_base
+{
+  public:
+    // Default constructor opens an illustration without changing the 
parameters.
+    explicit wx_test_existing_illustration(std::string const& file_ill)
+    {
+        wxUIActionSimulator ui;
+        ui.Char('o', wxMOD_CONTROL);    // "File|Open"
+
+        wxTEST_DIALOG
+            (wxYield()
+            ,wxExpectModal<wxFileDialog>(file_ill)
+            ,wxExpectDismissableModal<MvcController>(wxID_OK)
+                .Describe("illustration properties for " + file_ill)
+            );
+
+        set_opened();
+    }
+};
+
 #endif // wx_test_document_hpp




reply via email to

[Prev in Thread] Current Thread [Next in Thread]