OSDN Git Service

f8267abe8403a40a5e03ee7f6bcb65d6ce4a2746
[wptscs/wpts.git] / HmLibTest / Parsers / TextElementTest.cs
1 // ================================================================================================
2 // <summary>
3 //      TextElementのテストクラスソース。</summary>
4 //
5 // <copyright file="TextElementTest.cs" company="honeplusのメモ帳">
6 //      Copyright (C) 2011 Honeplus. All rights reserved.</copyright>
7 // <author>
8 //      Honeplus</author>
9 // ================================================================================================
10
11 namespace Honememo.Parsers
12 {
13     using System;
14     using NUnit.Framework;
15
16     /// <summary>
17     /// TextElementのテストクラスです。
18     /// </summary>
19     [TestFixture]
20     public class TextElementTest
21     {
22         #region コンストラクタテストケース
23
24         /// <summary>
25         /// コンストラクタテストケース。
26         /// </summary>
27         [Test]
28         public void TestConstructor()
29         {
30             TextElement element = new TextElement();
31             Assert.IsNull(element.Text);
32
33             element = new TextElement("test");
34             Assert.AreEqual("test", element.Text);
35         }
36
37         #endregion
38
39         #region プロパティテストケース
40
41         /// <summary>
42         /// Textプロパティテストケース。
43         /// </summary>
44         [Test]
45         public void TestText()
46         {
47             TextElement element = new TextElement();
48
49             Assert.IsNull(element.Text);
50             element.Text = "test";
51             Assert.AreEqual("test", element.Text);
52         }
53
54         #endregion
55
56         #region インタフェース実装メソッドテストケース
57
58         /// <summary>
59         /// ToStringメソッドテストケース。
60         /// </summary>
61         [Test]
62         public void TestToString()
63         {
64             TextElement element = new TextElement();
65
66             Assert.IsEmpty(element.ToString());
67             element.Text = "test";
68             Assert.AreEqual("test", element.ToString());
69         }
70
71         #endregion
72     }
73 }