예제 #1
0
파일: StackTest.cs 프로젝트: rNdm74/C-
        public void CountTestDefault()
        {
            int param0 = 5; // TODO: Initialize to an appropriate value
            Stack_Accessor<string> target = new Stack_Accessor<string>(param0); // TODO: Initialize to an appropriate value
            string item = "Hello"; // TODO: Initialize to an appropriate value
            target.Push(item);
            target.Push(item);
            target.Push(item);

            int expected = 3; // TODO: Initialize to an appropriate value
            int actual;
            actual = target.Count();
            Assert.AreEqual(expected, actual);
        }
예제 #2
0
파일: StackTest.cs 프로젝트: rNdm74/C-
        public void PushTestItemsInStack()
        {
            int param0 = 5;                                                       // TODO: Initialize to an appropriate value
            Stack_Accessor <string> target = new Stack_Accessor <string>(param0); // TODO: Initialize to an appropriate value
            string item = "Hello";                                                // TODO: Initialize to an appropriate value

            target.Push(item);
            target.Push(item);

            string expected = "Hello"; // TODO: Initialize to an appropriate value
            string actual;

            actual = target.Pop();
            Assert.AreEqual(expected, actual);
        }
예제 #3
0
파일: StackTest.cs 프로젝트: rNdm74/C-
        public void CountTestDefault()
        {
            int param0 = 5;                                                       // TODO: Initialize to an appropriate value
            Stack_Accessor <string> target = new Stack_Accessor <string>(param0); // TODO: Initialize to an appropriate value
            string item = "Hello";                                                // TODO: Initialize to an appropriate value

            target.Push(item);
            target.Push(item);
            target.Push(item);

            int expected = 3; // TODO: Initialize to an appropriate value
            int actual;

            actual = target.Count();
            Assert.AreEqual(expected, actual);
        }
예제 #4
0
파일: StackTest.cs 프로젝트: rNdm74/C-
        public void PushTestPushCastsStack()
        {
            int param0 = 5;                                                       // TODO: Initialize to an appropriate value
            Stack_Accessor <string> target = new Stack_Accessor <string>(param0); // TODO: Initialize to an appropriate value
            int item = 987654321;                                                 // TODO: Initialize to an appropriate value

            target.Push(item.ToString());
            target.Push(item.ToString());
            target.Push(item.ToString());
            target.Push(item.ToString());
            target.Push(item.ToString());

            string expected = "987654321"; // TODO: Initialize to an appropriate value
            string actual;

            actual = target.Pop();
            Assert.AreEqual(expected, actual);
        }
예제 #5
0
파일: StackTest.cs 프로젝트: rNdm74/C-
        public void PopTestEmptyStackThenPush()
        {
            int param0 = 5;                                                       // TODO: Initialize to an appropriate value
            Stack_Accessor <string> target = new Stack_Accessor <string>(param0); // TODO: Initialize to an appropriate value
            string item = target.Pop();                                           // TODO: Initialize to an appropriate value

            item = "Hello";                                                       // TODO: Initialize to an appropriate value
            target.Push(item);
            string actual;

            actual = target.Peek();
        }
예제 #6
0
파일: StackTest.cs 프로젝트: rNdm74/C-
        public void IsEmptyTestAfterFillingStackThenPoppingStack()
        {
            int param0 = 5;                                                       // TODO: Initialize to an appropriate value
            Stack_Accessor <string> target = new Stack_Accessor <string>(param0); // TODO: Initialize to an appropriate value
            string item = "Hello";                                                // TODO: Initialize to an appropriate value

            target.Push(item);
            target.Push(item);
            target.Push(item);
            target.Push(item);
            target.Push(item);
            item = target.Pop();
            item = target.Pop();
            item = target.Pop();
            item = target.Pop();
            item = target.Pop();

            bool expected = true; // TODO: Initialize to an appropriate value
            bool actual;

            actual = target.IsEmpty();
            Assert.AreEqual(expected, actual);
        }
예제 #7
0
파일: StackTest.cs 프로젝트: rNdm74/C-
        public void IsEmptyTestStackHasItem()
        {
            int param0 = 5;                                                       // TODO: Initialize to an appropriate value
            Stack_Accessor <string> target = new Stack_Accessor <string>(param0); // TODO: Initialize to an appropriate value
            string item = "Hello";                                                // TODO: Initialize to an appropriate value

            target.Push(item);

            bool expected = false; // TODO: Initialize to an appropriate value
            bool actual;

            actual = target.IsEmpty();
            Assert.AreEqual(expected, actual);
        }
예제 #8
0
파일: StackTest.cs 프로젝트: rNdm74/C-
        public void PeekTestCheckDoesntRemoveItem()
        {
            int param0 = 5;                                                       // TODO: Initialize to an appropriate value
            Stack_Accessor <string> target = new Stack_Accessor <string>(param0); // TODO: Initialize to an appropriate value
            string item = "Hello";                                                // TODO: Initialize to an appropriate value

            target.Push(item);
            item = target.Peek();

            int expected = 1; // TODO: Initialize to an appropriate value
            int actual;

            actual = target.Count();
            Assert.AreEqual(expected, actual);
        }
예제 #9
0
파일: StackTest.cs 프로젝트: rNdm74/C-
        public void PushTestFillStackWithStringArray()
        {
            string[] ARRAY = { "Monday", "Tuesday", "Wednesday", "Thursday", "Friday" };
            Stack_Accessor <string> target = new Stack_Accessor <string>(ARRAY.Length); // TODO: Initialize to an appropriate value

            for (int i = 0; i < ARRAY.Length; i++)
            {
                target.Push(ARRAY[i]);
            }

            string expected = "Friday"; // TODO: Initialize to an appropriate value
            string actual;

            actual = target.Pop();
            Assert.AreEqual(expected, actual);
        }
예제 #10
0
파일: StackTest.cs 프로젝트: rNdm74/C-
        public void PushTestPushStackIsFullException()
        {
            int param0 = 5;                                                       // TODO: Initialize to an appropriate value
            Stack_Accessor <string> target = new Stack_Accessor <string>(param0); // TODO: Initialize to an appropriate value
            string item = "Hello";                                                // TODO: Initialize to an appropriate value

            target.Push(item);
            target.Push(item);
            target.Push(item);
            target.Push(item);
            target.Push(item);
            target.Push(item);
        }
예제 #11
0
파일: StackTest.cs 프로젝트: rNdm74/C-
        public void PeekTestHelperDefault()
        {
            int param0 = 5; // TODO: Initialize to an appropriate value
            Stack_Accessor<string> target = new Stack_Accessor<string>(param0); // TODO: Initialize to an appropriate value
            string item = "Hello"; // TODO: Initialize to an appropriate value
            target.Push(item);

            string expected = "Hello"; // TODO: Initialize to an appropriate value
            string actual;
            actual = target.Peek();
            Assert.AreEqual(expected, actual);
        }
예제 #12
0
파일: StackTest.cs 프로젝트: rNdm74/C-
        public void PeekTestCheckDoesntRemoveItem()
        {
            int param0 = 5; // TODO: Initialize to an appropriate value
            Stack_Accessor<string> target = new Stack_Accessor<string>(param0); // TODO: Initialize to an appropriate value
            string item = "Hello"; // TODO: Initialize to an appropriate value
            target.Push(item);
            item = target.Peek();

            int expected = 1; // TODO: Initialize to an appropriate value
            int actual;
            actual = target.Count();
            Assert.AreEqual(expected, actual);
        }
예제 #13
0
파일: StackTest.cs 프로젝트: rNdm74/C-
 public void PushTestPushStackIsFullException()
 {
     int param0 = 5; // TODO: Initialize to an appropriate value
     Stack_Accessor<string> target = new Stack_Accessor<string>(param0); // TODO: Initialize to an appropriate value
     string item = "Hello"; // TODO: Initialize to an appropriate value
     target.Push(item);
     target.Push(item);
     target.Push(item);
     target.Push(item);
     target.Push(item);
     target.Push(item);
 }
예제 #14
0
파일: StackTest.cs 프로젝트: rNdm74/C-
        public void PushTestPushNullFullStack()
        {
            int param0 = 5; // TODO: Initialize to an appropriate value
            Stack_Accessor<string> target = new Stack_Accessor<string>(param0); // TODO: Initialize to an appropriate value
            string item = null; // TODO: Initialize to an appropriate value
            target.Push(item);
            target.Push(item);
            target.Push(item);
            target.Push(item);
            target.Push(item);

            string expected = null; // TODO: Initialize to an appropriate value
            string actual;
            actual = target.Pop();
            Assert.AreEqual(expected, actual);
        }
예제 #15
0
파일: StackTest.cs 프로젝트: rNdm74/C-
        public void PushTestPushCastsStack()
        {
            int param0 = 5; // TODO: Initialize to an appropriate value
            Stack_Accessor<string> target = new Stack_Accessor<string>(param0); // TODO: Initialize to an appropriate value
            int item = 987654321; // TODO: Initialize to an appropriate value
            target.Push(item.ToString());
            target.Push(item.ToString());
            target.Push(item.ToString());
            target.Push(item.ToString());
            target.Push(item.ToString());

            string expected = "987654321"; // TODO: Initialize to an appropriate value
            string actual;
            actual = target.Pop();
            Assert.AreEqual(expected, actual);
        }
예제 #16
0
파일: StackTest.cs 프로젝트: rNdm74/C-
        public void PushTestFillStackWithStringArray()
        {
            string[] ARRAY = { "Monday", "Tuesday", "Wednesday", "Thursday", "Friday" };
            Stack_Accessor<string> target = new Stack_Accessor<string>(ARRAY.Length); // TODO: Initialize to an appropriate value

            for (int i = 0; i < ARRAY.Length; i++)
            {
                target.Push(ARRAY[i]);
            }

            string expected = "Friday"; // TODO: Initialize to an appropriate value
            string actual;
            actual = target.Pop();
            Assert.AreEqual(expected, actual);
        }
예제 #17
0
파일: StackTest.cs 프로젝트: rNdm74/C-
 public void PopTestEmptyStackThenPush()
 {
     int param0 = 5; // TODO: Initialize to an appropriate value
     Stack_Accessor<string> target = new Stack_Accessor<string>(param0); // TODO: Initialize to an appropriate value
     string item = target.Pop(); // TODO: Initialize to an appropriate value
     item = "Hello"; // TODO: Initialize to an appropriate value
     target.Push(item);
     string actual;
     actual = target.Peek();
 }
예제 #18
0
파일: StackTest.cs 프로젝트: rNdm74/C-
        public void IsEmptyTestAfterFillingStackThenPoppingStack()
        {
            int param0 = 5; // TODO: Initialize to an appropriate value
            Stack_Accessor<string> target = new Stack_Accessor<string>(param0); // TODO: Initialize to an appropriate value
            string item = "Hello"; // TODO: Initialize to an appropriate value
            target.Push(item);
            target.Push(item);
            target.Push(item);
            target.Push(item);
            target.Push(item);
            item = target.Pop();
            item = target.Pop();
            item = target.Pop();
            item = target.Pop();
            item = target.Pop();

            bool expected = true; // TODO: Initialize to an appropriate value
            bool actual;
            actual = target.IsEmpty();
            Assert.AreEqual(expected, actual);
        }
예제 #19
0
파일: StackTest.cs 프로젝트: rNdm74/C-
        public void IsEmptyTestStackHasItem()
        {
            int param0 = 5; // TODO: Initialize to an appropriate value
            Stack_Accessor<string> target = new Stack_Accessor<string>(param0); // TODO: Initialize to an appropriate value
            string item = "Hello"; // TODO: Initialize to an appropriate value
            target.Push(item);

            bool expected = false; // TODO: Initialize to an appropriate value
            bool actual;
            actual = target.IsEmpty();
            Assert.AreEqual(expected, actual);
        }