コード例 #1
0
        public void Add_Object_ToEmptyList()
        {
            CustomList <ExampleTest> customList = new CustomList <ExampleTest>();
            ExampleTest testInput = new ExampleTest();

            customList.Add(testInput);

            Assert.AreEqual(customList[0], testInput);
        }
コード例 #2
0
        public void Remove_Object_GetCount()
        {
            CustomList <ExampleTest> customList = new CustomList <ExampleTest>();
            ExampleTest testInput      = new ExampleTest();
            int         expectedResult = 1;

            customList.Add(testInput);
            customList.Add(testInput);
            customList.Remove(testInput);
            int actualResult = customList.Count;

            Assert.AreEqual(expectedResult, actualResult);
        }
コード例 #3
0
        static void Main(string[] args)
        {
            //Ensure DB Created.
            Database.Database db = new Database.Database();
            db.Database.EnsureCreated();

            ExampleTest test = new ExampleTest();

            TestOne   testOne   = new TestOne();
            TestTwo   testTwo   = new TestTwo();
            TestThree testThree = new TestThree();
            TestFour  testFour  = new TestFour();

            Console.ReadKey();
        }