implement the skeleton methods of DSCanvas 39/241539/1
authorSooChan Lim <sc1.lim@samsung.com>
Thu, 18 Jun 2020 01:46:46 +0000 (10:46 +0900)
committerSung-Jin Park <sj76.park@samsung.com>
Thu, 20 Aug 2020 09:44:56 +0000 (18:44 +0900)
At this time, the test case fails.

Change-Id: I117ca29be31411724b8eed4760f102a1cc6ee2dd

src/DSCanvas/DSCanvas.cpp
src/DSCanvas/DSCanvas.h
tests/DSCanvas-test.cpp

index 3465c5f..1dbb985 100644 (file)
@@ -2,9 +2,23 @@
 
 namespace display_server
 {
+
 DSCanvas::DSCanvas()
+       : __polcyArea(nullptr),
+         __displayArea(nullptr)
 {}
 
 DSCanvas::~DSCanvas()
 {}
+
+bool DSCanvas::attachPolicyArea(DSPolicyArea *polcyArea)
+{
+       return false;
+}
+
+bool DSCanvas::attachDisplayArea(DSDisplayArea *displayArea)
+{
+       return false;
+}
+
 } // namespace display_server
\ No newline at end of file
index 47063ab..0d45cad 100644 (file)
@@ -1,6 +1,9 @@
 #ifndef _DSCANVAS_H_
 #define _DSCANVAS_H_
 
+#include <DSPolicyArea.h>
+#include <DSDisplayArea.h>
+
 namespace display_server
 {
 class DSCanvas
@@ -9,8 +12,12 @@ public:
        DSCanvas();
        virtual ~DSCanvas();
 
+       bool attachPolicyArea(DSPolicyArea *polcyArea);
+       bool attachDisplayArea(DSDisplayArea *displayArea);
+
 private:
-       /* data */
+       DSPolicyArea *__polcyArea;
+       DSDisplayArea *__displayArea;
 };
 }
 
index 5efc393..c9138df 100644 (file)
@@ -18,3 +18,13 @@ TEST_F(DSCanvasTest, NewDSCanvas)
        delete canvas;
        ASSERT_TRUE(true);
 }
+
+TEST_F(DSCanvasTest, BasicMethods)
+{
+       DSCanvas canvas;
+       DSPolicyArea policyArea;
+       DSDisplayArea displayArea;
+
+       EXPECT_TRUE(canvas.attachPolicyArea(&policyArea) == true);
+       EXPECT_TRUE(canvas.attachDisplayArea(&displayArea) == true);
+}
\ No newline at end of file