[Jiemamy-notify] commit [2143] [CORE-81] DiagramPresentationModelImplTest追加。

アーカイブの一覧に戻る

svnno****@sourc***** svnno****@sourc*****
2008年 11月 13日 (木) 01:42:26 JST


Revision: 2143
          http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=jiemamy&view=rev&rev=2143
Author:   daisuke_m
Date:     2008-11-13 01:42:26 +0900 (Thu, 13 Nov 2008)

Log Message:
-----------
[CORE-81] DiagramPresentationModelImplTest追加。

Added Paths:
-----------
    artemis/trunk/org.jiemamy.view/src/test/java/org/jiemamy/view/DiagramPresentationModelImplTest.java


-------------- next part --------------
Added: artemis/trunk/org.jiemamy.view/src/test/java/org/jiemamy/view/DiagramPresentationModelImplTest.java
===================================================================
--- artemis/trunk/org.jiemamy.view/src/test/java/org/jiemamy/view/DiagramPresentationModelImplTest.java	                        (rev 0)
+++ artemis/trunk/org.jiemamy.view/src/test/java/org/jiemamy/view/DiagramPresentationModelImplTest.java	2008-11-12 16:42:26 UTC (rev 2143)
@@ -0,0 +1,86 @@
+/*
+ * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others.
+ * Created on 2008/11/13
+ *
+ * This file is part of Jiemamy.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+ * either express or implied. See the License for the specific language
+ * governing permissions and limitations under the License.
+ */
+package org.jiemamy.view;
+
+import static org.hamcrest.core.Is.is;
+import static org.hamcrest.core.IsNot.not;
+import static org.hamcrest.core.IsNull.nullValue;
+import static org.junit.Assert.assertThat;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+import org.jiemamy.core.S2FactoryStrategy;
+import org.jiemamy.creator.JiemamyModelFactory;
+import org.jiemamy.spec.model.RootModel;
+import org.jiemamy.spec.view.model.DiagramPresentationModel;
+
+/**
+ * TODO for daisuke
+ * @author daisuke
+ */
+public class DiagramPresentationModelImplTest {
+	
+	private RootModel rootModel;
+	
+	private DiagramPresentationModel presentation;
+	
+
+	/**
+	 * setup
+	 * @throws java.lang.Exception
+	 */
+	@Before
+	public void setUp() throws Exception {
+		JiemamyModelFactory.init(new S2FactoryStrategy("jiemamy-view.dicon"));
+		rootModel = JiemamyModelFactory.createRoot().init();
+		presentation = rootModel.createJiemamyModel(DiagramPresentationModel.class).init("testPresentation");
+		rootModel.appendModel(presentation);
+	}
+	
+	/**
+	 * teardown
+	 * @throws java.lang.Exception
+	 */
+	@After
+	public void tearDown() throws Exception {
+		rootModel.removeModel(presentation);
+		presentation = null;
+		rootModel = null;
+	}
+	
+	/**
+	 * 各プロパティが正常に初期化されていること。
+	 * @throws Exception 
+	 */
+	@Test
+	public void test01_各プロパティが正常に初期化されていること() throws Exception {
+		assertThat(presentation.getNodeLayouts(), not(nullValue()));
+		assertThat(presentation.getNodeColors(), not(nullValue()));
+		assertThat(presentation.getConnectionLayouts(), not(nullValue()));
+		assertThat(presentation.getDisplayTargetSet(), not(nullValue()));
+		assertThat(presentation.getName(), is("testPresentation"));
+		
+		assertThat(presentation.getNodeLayouts().size(), is(0));
+		assertThat(presentation.getNodeColors().size(), is(0));
+		assertThat(presentation.getConnectionLayouts().size(), is(0));
+		assertThat(presentation.getDisplayTargetSet().size(), is(0));
+	}
+}


Property changes on: artemis/trunk/org.jiemamy.view/src/test/java/org/jiemamy/view/DiagramPresentationModelImplTest.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain


Jiemamy-notify メーリングリストの案内
アーカイブの一覧に戻る