예제 #1
0
        public void Quandary_Init(int initial, int final)
        {
            Quandary <int> quandary = new Quandary <int>(initial, final);

            Assert.AreEqual(initial, quandary.Initial);
            Assert.AreEqual(final, quandary.Final);
        }
예제 #2
0
        public void Quandary_Set_Initial()
        {
            int            initial  = int.MinValue;
            Quandary <int> quandary = new Quandary <int>(initial, int.MaxValue);

            Assert.AreEqual(initial, quandary.Initial);
            Assert.AreEqual(int.MaxValue, quandary.Final);

            initial          = 0;
            quandary.Initial = initial;
            Assert.AreEqual(initial, quandary.Initial);
            Assert.AreEqual(int.MaxValue, quandary.Final);
        }
예제 #3
0
        public void Quandary_Set_Final()
        {
            int            final    = 0;
            Quandary <int> quandary = new Quandary <int>(int.MinValue, final);

            Assert.AreEqual(int.MinValue, quandary.Initial);
            Assert.AreEqual(final, quandary.Final);

            final          = int.MaxValue;
            quandary.Final = final;
            Assert.AreEqual(int.MinValue, quandary.Initial);
            Assert.AreEqual(final, quandary.Final);
        }