示例#1
0
        public void Decrement_CountEqualZero_ThrowInvalidOperationException()
        {
            var word = new Word("a");
              word.Decrement();

              Assert.Throws<InvalidOperationException>(word.Decrement);
        }
示例#2
0
        public void Increment_IncrementCount()
        {
            var word = new Word("a");

              word.Increment();

              Assert.AreEqual(2, word.Count);
        }
示例#3
0
        public void Decrement_DecrementCount()
        {
            var word = new Word("a");

              word.Decrement();

              Assert.AreEqual(0, word.Count);
        }
示例#4
0
        public void Constructor_SetWordValue()
        {
            const string elemName = "elem name";

              var word = new Word(elemName);

              Assert.AreEqual(elemName, word.Value);
        }
示例#5
0
        public void Constructor_SetWordConter()
        {
            var word = new Word("a");

              Assert.AreEqual(1, word.Count);
        }