Exemple #1
0
        public static void InitTestSession()
        {
            CultureInfo enUS = CultureInfo.CreateSpecificCulture("en-US");

            CultureInfo.DefaultThreadCurrentCulture   = enUS;
            CultureInfo.DefaultThreadCurrentUICulture = enUS;
            Thread.CurrentThread.CurrentCulture       = enUS;
            Thread.CurrentThread.CurrentUICulture     = enUS;

            Assembly LargeListAssembly;

            try
            {
                LargeListAssembly = Assembly.Load("LargeList");
            }
            catch
            {
                LargeListAssembly = null;
            }

            Assume.That(LargeListAssembly != null);

            LargeListAssemblyAttribute Attribute = LargeListAssembly.GetCustomAttribute(typeof(LargeListAssemblyAttribute)) as LargeListAssemblyAttribute;

            Assume.That(Attribute != null);

            bool IsStrict = Attribute.IsStrict;
            int  DefaultMaxSegmentCapacity = Attribute.DefaultMaxSegmentCapacity;

            TestLargeList <int> .Init(IsStrict, DefaultMaxSegmentCapacity);

            TestLargeList <string> .Init(IsStrict, DefaultMaxSegmentCapacity);

            TestLargeList <TestClass> .Init(IsStrict, DefaultMaxSegmentCapacity);
        }
Exemple #2
0
        public static void TestSessionInteger_readonly_list()
        {
            TestStatus Status;

            Status = TestLargeList <int> .Test_readonly_list();

            Assert.That(Status.Succeeded, Status.Name);
        }
Exemple #3
0
        public static void TestSessionInteger_collection()
        {
            TestStatus Status;

            Status = TestLargeList <int> .Test_collection();

            Assert.That(Status.Succeeded, Status.Name);
        }
Exemple #4
0
        public static void TestSessionGeneric_readonly_list()
        {
            TestStatus Status;

            Status = TestLargeList <TestClass> .Test_readonly_list();

            Assert.That(Status.Succeeded, Status.Name);
        }
Exemple #5
0
        public static void TestSessionGeneric_collection()
        {
            TestStatus Status;

            Status = TestLargeList <TestClass> .Test_collection();

            Assert.That(Status.Succeeded, Status.Name);
        }
Exemple #6
0
        public static void TestSessionString_readonly_list()
        {
            TestStatus Status;

            Status = TestLargeList <string> .Test_readonly_list();

            Assert.That(Status.Succeeded, Status.Name);
        }
Exemple #7
0
        public static void TestSessionString_collection()
        {
            TestStatus Status;

            Status = TestLargeList <string> .Test_collection();

            Assert.That(Status.Succeeded, Status.Name);
        }
Exemple #8
0
        public static void TestSessionIntegerSimultaneous_collections(
            [Values(0, 1, 2, 3, 4, 5, 6, 7, 8, 9)] int loopDigit1,
            [Values(0, 1, 2, 3, 4, 5, 6, 7, 8, 9)] int loopDigit0)
        {
            int        Loop = (loopDigit1 * 10) + loopDigit0;
            TestStatus Status;

            if (Loop < MaxCollectionLoops)
            {
                Status = TestLargeList <int> .SimultaneousTest_collections(Loop, 0, CreateInt);
            }
            else
            {
                Status = TestStatus.Success;
            }

            Assert.That(Status.Succeeded, Status.Name);
        }
Exemple #9
0
        public static void TestSessionTestClassSimultaneous_lists(
            [Values(0, 1, 2, 3, 4, 5, 6, 7, 8, 9)] int loopDigit1,
            [Values(0, 1, 2, 3, 4, 5, 6, 7, 8, 9)] int loopDigit0)
        {
            if (loopDigit1 > 2 || loopDigit0 > 2)
            {
                return;
            }

            int        Loop = (loopDigit1 * 10) + loopDigit0;
            TestStatus Status;

            if (Loop < MaxListLoops)
            {
                Status = TestLargeList <TestClass> .SimultaneousTest_lists(Loop, 0, CreateTestClass);
            }
            else
            {
                Status = TestStatus.Success;
            }

            Assert.That(Status.Succeeded, Status.Name);
        }