Index: trunk/TestCase/SimpleTestCase/SerializeTest.ab
===================================================================
--- trunk/TestCase/SimpleTestCase/SerializeTest.ab	(revision 465)
+++ trunk/TestCase/SimpleTestCase/SerializeTest.ab	(revision 465)
@@ -0,0 +1,56 @@
+Namespace SerializeTest
+
+Class Foo
+	a As Long
+	b As Long
+	c As Long
+	d As Long
+Public
+	Sub Foo()
+		a=100
+		b=200
+		c=300
+		d=400
+	End Sub
+End Class
+
+Sub TestMain()
+	' 一時ディレクトリを取得
+	Dim tempDir = GetExclusiveTempDirPath( "SerializeTest" )
+
+	' fooインスタンスを生成
+	Dim foo = New Foo
+
+
+	'----------------------------------------------------------------
+	' シリアライズ
+	'----------------------------------------------------------------
+
+	' 保存先のファイルを開いて、
+	Dim fooXmlFilePath = tempDir + "\foo.xml"
+	Dim fs = New System.IO.FileStream( fooXmlFilePath, System.IO.FileMode.Create )
+
+	' シリアライズして、
+	Dim serializer = New System.Xml.Serialization.XmlSerializer( foo.GetType() )
+	serializer.Serialize( fs, foo )
+
+	' 閉じる。
+	fs.Close()
+
+
+	'----------------------------------------------------------------
+	' デシリアライズ
+	'----------------------------------------------------------------
+
+	' 読み込んでみる。
+	Dim doc = New System.Xml.XmlDocument
+	doc.Load( tempDir + "\foo.xml" )
+	System.Diagnostics.Debug.WriteLine( doc.OuterXml )
+
+	' TODO: デシリアライズは未完成(￣□￣；)
+End Sub
+
+
+End Namespace
+
+SerializeTest.TestMain()
Index: trunk/TestCase/SimpleTestCase/SimpleTestCase.ab
===================================================================
--- trunk/TestCase/SimpleTestCase/SimpleTestCase.ab	(revision 457)
+++ trunk/TestCase/SimpleTestCase/SimpleTestCase.ab	(revision 465)
@@ -4,4 +4,18 @@
 
 Dim hStdOut = _System_hConsoleOut
+
+Sub Initialize()
+	' 初期化関数
+
+	' 一時ディレクトリを空にしておく
+	Dim tempDir = System.IO.Path.GetDirectoryName( System.Windows.Forms.Application.ExecutablePath ) + "\temp"
+	If System.IO.Directory.Exists( tempDir ) Then
+		' 存在するときは一旦消す
+		System.IO.Directory.Delete( tempDir, True )
+	End If
+	System.IO.Directory.CreateDirectory( tempDir )
+End Sub
+
+Initialize()
 
 Dim csbi As CONSOLE_SCREEN_BUFFER_INFO
@@ -40,4 +54,16 @@
 End Sub
 
+Function GetExclusiveTempDirPath( testCaseName As String ) As String
+	Dim tempDir = System.IO.Path.GetDirectoryName( System.Windows.Forms.Application.ExecutablePath ) + "\temp"
+	Dim exclusiveTempDirPath = tempDir + "\" + testCaseName
+
+	If Not System.IO.Directory.Exists( exclusiveTempDirPath ) Then
+		' 無かったら作る
+		System.IO.Directory.CreateDirectory( exclusiveTempDirPath )
+	End If
+
+	Return exclusiveTempDirPath
+End Function
+
 Print "Please Enter key"
 System.Console.ReadLine()
Index: trunk/TestCase/SimpleTestCase/SimpleTestCase.idx
===================================================================
--- trunk/TestCase/SimpleTestCase/SimpleTestCase.idx	(revision 457)
+++ trunk/TestCase/SimpleTestCase/SimpleTestCase.idx	(revision 465)
@@ -38,6 +38,4 @@
 #include "XmlTest.ab"
 _ClearNamespaceImported
-
-'リソースファイル
-#include "resource.ab"
-#resource "SimpleTestCase.rc"
+#include "SerializeTest.ab"
+_ClearNamespaceImported
Index: trunk/TestCase/SimpleTestCase/SimpleTestCase.pj
===================================================================
--- trunk/TestCase/SimpleTestCase/SimpleTestCase.pj	(revision 457)
+++ trunk/TestCase/SimpleTestCase/SimpleTestCase.pj	(revision 465)
@@ -23,5 +23,5 @@
 #DEBUG_EXE_PATH=
 
-#RESOURCE=SimpleTestCase.rc
+#RESOURCE=0
 
 #SOURCE
@@ -44,2 +44,3 @@
 StreamTest.ab
 XmlTest.ab
+SerializeTest.ab
Index: trunk/TestCase/SimpleTestCase/XmlTest.ab
===================================================================
--- trunk/TestCase/SimpleTestCase/XmlTest.ab	(revision 457)
+++ trunk/TestCase/SimpleTestCase/XmlTest.ab	(revision 465)
@@ -3,6 +3,9 @@
 
 Sub TestMain()
+	' 一時ディレクトリを取得
+	Dim tempDir = GetExclusiveTempDirPath( "XmlTest" )
+
 	Dim doc = New System.Xml.XmlDocument()
-	doc.AppendChild( doc.CreateXmlDeclaration( "1.0", "UTF-8", Nothing ) )
+	doc.AppendChild( doc.CreateXmlDeclaration( "1.0", "shift-jis", Nothing ) )
 	doc.AppendChild( doc.CreateElement( "root" ) )
 	doc.ChildNodes[1].AppendChild( doc.CreateElement( "test" ) )
@@ -15,5 +18,13 @@
 	doc.ChildNodes[1].Attributes.Add( attr2 )
 
-	System.Diagnostics.Debug.WriteLine( doc.OuterXml() )
+	' 書いて
+	doc.Save( tempDir + "\test.xml" )
+
+	' 読んで
+	Dim clone = New System.Xml.XmlDocument
+	clone.Load( tempDir + "\test.xml" )
+
+	' 比較してみる
+	UnitTest( "XmlTest", doc.OuterXml = clone.OuterXml )
 End Sub
 
