예제 #1
0
        private ArubaFailure[] InitializeFailures()
        {
            var failures = new ArubaFailure[EntitiesCount];

            for (var i = 0; i < EntitiesCount; i++)
            {
                if (i % 3 == 0)
                {
                    var failure = new ArubaFailure
                    {
                        Changed   = new DateTime(2000, i % 12 + 1, i % 28 + 1),
                        Log       = "Failure Log " + i,
                        TestCase  = "Failure Test Case " + i,
                        TestId    = i,
                        Variation = i % 4,
                        Configs   = new List <ArubaConfig>(),
                        Bugs      = new List <ArubaBug>(),
                    };
                    failures[i] = failure;
                }
                else if (i % 3 == 1)
                {
                    var baseline = new ArubaBaseline
                    {
                        Changed   = new DateTime(2000, i % 12 + 1, i % 28 + 1),
                        Comment   = "Baseline Comment " + i,
                        Log       = "Baseline Log " + i,
                        TestCase  = "Baseline Test Case " + i,
                        TestId    = i % 4,
                        Variation = i,
                        Configs   = new List <ArubaConfig>(),
                        Bugs      = new List <ArubaBug>(),
                    };
                    failures[i] = baseline;
                }
                else
                {
                    var testFailure = new ArubaTestFailure
                    {
                        Changed   = new DateTime(2000, i % 12 + 1, i % 28 + 1),
                        Comment   = "Test Failure Comment " + i % 2,
                        Log       = "Test Failure Log " + i,
                        TestCase  = "Test Failure Test Case " + i,
                        TestId    = i % 4,
                        Variation = i,
                        Configs   = new List <ArubaConfig>(),
                        Bugs      = new List <ArubaBug>(),
                    };
                    failures[i] = testFailure;
                }
            }

            return(failures);
        }
예제 #2
0
        private ArubaFailure[] InitializeFailures()
        {
            var failures = new ArubaFailure[EntitiesCount];
            for (var i = 0; i < EntitiesCount; i++)
            {
                if (i % 3 == 0)
                {
                    var failure = new ArubaFailure
                    {
                        Changed = new DateTime(2000, i % 12 + 1, i % 28 + 1),
                        Log = "Failure Log " + i,
                        TestCase = "Failure Test Case " + i,
                        TestId = i,
                        Variation = i % 4,
                        Configs = new List<ArubaConfig>(),
                        Bugs = new List<ArubaBug>(),
                    };
                    failures[i] = failure;
                }
                else if (i % 3 == 1)
                {
                    var baseline = new ArubaBaseline
                    {
                        Changed = new DateTime(2000, i % 12 + 1, i % 28 + 1),
                        Comment = "Baseline Comment " + i,
                        Log = "Baseline Log " + i,
                        TestCase = "Baseline Test Case " + i,
                        TestId = i % 4,
                        Variation = i,
                        Configs = new List<ArubaConfig>(),
                        Bugs = new List<ArubaBug>(),
                    };
                    failures[i] = baseline;
                }
                else
                {
                    var testFailure = new ArubaTestFailure
                    {
                        Changed = new DateTime(2000, i % 12 + 1, i % 28 + 1),
                        Comment = "Test Failure Comment " + i % 2,
                        Log = "Test Failure Log " + i,
                        TestCase = "Test Failure Test Case " + i,
                        TestId = i % 4,
                        Variation = i,
                        Configs = new List<ArubaConfig>(),
                        Bugs = new List<ArubaBug>(),
                    };
                    failures[i] = testFailure;
                }
            }

            return failures;
        }