public void TickDataTable_AddTickData_One()
        {
            var tickData = new GtTickData();

            tickData.RemarkOrChordName = "F#";
            tickData.String6           = 2;
            tickData.String5           = 4;
            tickData.String4           = 4;

            var tickDataTable = new GtTickDataTable(10);

            tickDataTable.AddTickData(new BeatTick(1, 0), new BeatTick(1, 0), tickData);

            Assert.AreEqual(tickData.RemarkOrChordName, tickDataTable[1, 0].RemarkOrChordName);

            Assert.AreEqual(tickData.String6, tickDataTable[1, 0].String6);
            Assert.AreEqual(tickData.String5, tickDataTable[1, 0].String5);
            Assert.AreEqual(tickData.String4, tickDataTable[1, 0].String4);
            Assert.AreEqual(tickData.String3, tickDataTable[1, 0].String3);
            Assert.AreEqual(tickData.String2, tickDataTable[1, 0].String2);
            Assert.AreEqual(tickData.String1, tickDataTable[1, 0].String1);

            Assert.IsTrue(tickDataTable[1, 0].IsStartTick);
            Assert.IsTrue(tickDataTable[1, 0].IsEndTick);
        }
        public void TickDataTable_AddTickData_Invalid()
        {
            var tickData = new GtTickData();

            var tickDataTable = new GtTickDataTable(10);

            tickDataTable.AddTickData(new BeatTick(2, 0), new BeatTick(1, 0), tickData);
        }
        public void TickDataTable_AddTickData_DifferentReference()
        {
            var tickData      = new GtTickData();
            var tickDataTable = new GtTickDataTable(10);

            tickDataTable.AddTickData(new BeatTick(1, 0), new BeatTick(1, 0), tickData);

            Assert.AreNotSame(tickData, tickDataTable[1, 0]);
        }
        public void TickDataTable_AddTickData_Many()
        {
            var tickData = new GtTickData();

            tickData.RemarkOrChordName = "F#";
            tickData.String6           = 2;
            tickData.String5           = 4;
            tickData.String4           = 4;

            var tickDataTable = new GtTickDataTable(10);

            tickDataTable.AddTickData(new BeatTick(1, 0), new BeatTick(1, 470), tickData);

            for (int tick = 0; tick < 480; tick += 10)
            {
                Assert.AreEqual(tickData.RemarkOrChordName, tickDataTable[1, tick].RemarkOrChordName);
                Assert.AreEqual(tickData.String6, tickDataTable[1, tick].String6);
                Assert.AreEqual(tickData.String5, tickDataTable[1, tick].String5);
                Assert.AreEqual(tickData.String4, tickDataTable[1, tick].String4);

                if (tick == 0)
                {
                    //first item
                    Assert.IsTrue(tickDataTable[1, tick].IsStartTick);
                    Assert.IsFalse(tickDataTable[1, tick].IsEndTick);
                }
                else if (tick == 470)
                {
                    //last item
                    Assert.IsFalse(tickDataTable[1, tick].IsStartTick);
                    Assert.IsTrue(tickDataTable[1, tick].IsEndTick);
                }
                else
                {
                    //other item
                    Assert.IsFalse(tickDataTable[1, tick].IsStartTick);
                    Assert.IsFalse(tickDataTable[1, tick].IsEndTick);
                }
            }

            Assert.AreEqual("", tickDataTable[2, 0].RemarkOrChordName);
            Assert.IsNull(tickDataTable[2, 0].String6);
            Assert.IsNull(tickDataTable[2, 0].String5);
            Assert.IsNull(tickDataTable[2, 0].String4);
        }