コード例 #1
0
        private void assertData()
        {
            assertDictionaries();
            DC.Data.Dispose();

            if (bakCsvFileSwapper.UseBackupFiles())
            {
                _ = new DC(csvConfig);
                assertDictionaries();
                DC.DisposeData();
                bakCsvFileSwapper.SwapBack();
            }

            _ = new DC(csvConfig);
            assertDictionaries();
        }
コード例 #2
0
        private void assertDataDisposeDCRecreateDCassertData(string expectedDcString1, string?expectedDcString2 = null)
        {
            assertData(expectedDcString1);
            DC.DisposeData();

            if (bakCsvFileSwapper.UseBackupFiles())
            {
                dc = new DC(csvConfig);
                assertData(expectedDcString2 ?? expectedDcString1);
                DC.DisposeData();
                bakCsvFileSwapper.SwapBack();
            }


            dc = new DC(csvConfig);
            assertData(expectedDcString2 ?? expectedDcString1);

            if (parent0__ is not null)
            {
                parent0__ = dc.SingleChildParents[1];
            }
            if (parent0 is not null)
            {
                parent0 = dc.SingleChildParents[0];
            }
            if (parent1__ is not null)
            {
                parent1__ = dc.SingleChildParents[2];
            }
            if (parent1 is not null)
            {
                parent1 = dc.SingleChildParents[3];
            }
            if (parentN0__ is not null)
            {
                parentN0__ = dc.SingleChildParentNs[0];
            }
            if (parentN0 is not null)
            {
                parentN0 = dc.SingleChildParentNs[1];
            }
            if (parentN1__ is not null)
            {
                parentN1__ = dc.SingleChildParentNs[2];
            }
            if (parentN1 is not null)
            {
                parentN1 = dc.SingleChildParentNs[3];
            }
            if (parentR0__ is not null)
            {
                parentR0__ = dc.SingleChildParentRs[0];
            }
            if (parentR0 is not null)
            {
                parentR0 = dc.SingleChildParentRs[1];
            }
            if (parentR1 is not null)
            {
                parentR1 = dc.SingleChildParentRs[2];
            }
            if (parentNR0__ is not null)
            {
                parentNR0__ = dc.SingleChildParentNRs[0];
            }
            if (parentNR0 is not null)
            {
                parentNR0 = dc.SingleChildParentNRs[1];
            }
            if (parentNR1 is not null)
            {
                parentNR1 = dc.SingleChildParentNRs[2];
            }
            if (child0 is not null)
            {
                child0 = dc.SingleChildChildren[0];
            }
            if (child1 is not null)
            {
                child1 = dc.SingleChildChildren[1];
            }
        }