示例#1
0
        public void SetRingsMethod()
        {
            int[]    rings      = new[] { 0 };
            IRingSet newRingSet = new RingSet(rings);

            int[] newRing = new[] { 32, 22 };
            newRingSet.SetRings(newRing);
            Assert.That(newRingSet.Rings, Is.EqualTo(newRing));
            Assert.That(newRingSet.RingCount, Is.EqualTo(newRing.Length));
        }
示例#2
0
        public void SetCurPos()
        {
            int[]   rings      = { 32, 22 };
            RingSet newRingSet = new RingSet(rings);
            Shifter newShifter = new Shifter(newRingSet);

            Assert.That(newShifter.Rings, Is.EqualTo(newRingSet));
            Assert.That(newShifter.GetRingCount(), Is.EqualTo(newRingSet.RingCount));
            Assert.That(newShifter.CurPos, Is.EqualTo(0));

            int[] newRings = { 11, 22, 33 };
            newRingSet.SetRings(newRings);
            newShifter.SettingGears(newRingSet);
            Assert.That(newShifter.Rings, Is.EqualTo(newRingSet));
            Assert.That(newShifter.GetRingCount(), Is.EqualTo(newRingSet.RingCount));
            Assert.That(newShifter.CurPos, Is.EqualTo(0));
        }