Пример #1
0
        public void FillDeltaCDNUllParameters(string type, int dataset)
        {
            DumpingBuffer  dbObj    = dbMock.Object;
            Mock <DeltaCD> dCD_mock = new Mock <DeltaCD>();
            DeltaCD        dCD_obj  = dCD_mock.Object;

            Assert.Throws <ArgumentNullException>(() =>
            {
                dbObj.FillDeltaCD(dCD_obj, type, null, dataset);
            });
        }
Пример #2
0
        public void FillDeltaCDGoodParameters(string type, int dataset)
        {
            DumpingBuffer  dbObj                = dbMock.Object;
            Mock <DeltaCD> dCD_mock             = new Mock <DeltaCD>();
            DeltaCD        dCD_obj              = dCD_mock.Object;
            Mock <CollectionDescription> cdMock = new Mock <CollectionDescription>(dataset);
            CollectionDescription        cdObj  = cdMock.Object;
            Mock <Value> valMock                = new Mock <Value>("7414", 204);

            cdObj.Dpc.dumpingPropertyList[0].Code         = "CODE_ANALOG";
            cdObj.Dpc.dumpingPropertyList[1].Code         = "CODE_DIGITAL";
            cdObj.Dpc.dumpingPropertyList[0].DumpingValue = valMock.Object;
            cdObj.Dpc.dumpingPropertyList[1].DumpingValue = valMock.Object;

            dbObj.FillDeltaCD(dCD_obj, type, cdObj, dataset);
            Assert.AreEqual(dCD_obj.AddDic[dataset].Dataset, cdObj.Dataset);
        }
Пример #3
0
        public void FillDeltaCDBadParameters(string type, int dataset)
        {
            DumpingBuffer  dbObj                = dbMock.Object;
            Mock <DeltaCD> dCD_mock             = new Mock <DeltaCD>();
            DeltaCD        dCD_obj              = dCD_mock.Object;
            Mock <CollectionDescription> cdMock = new Mock <CollectionDescription>(2);
            CollectionDescription        cdObj  = cdMock.Object;
            Mock <Value> valMock                = new Mock <Value>("7414", 204);

            cdObj.Dpc.dumpingPropertyList[0].Code         = "CODE_ANALOG";
            cdObj.Dpc.dumpingPropertyList[1].Code         = "CODE_DIGITAL";
            cdObj.Dpc.dumpingPropertyList[0].DumpingValue = valMock.Object;
            cdObj.Dpc.dumpingPropertyList[1].DumpingValue = valMock.Object;

            Assert.Throws <ArgumentException>(() =>
            {
                dbObj.FillDeltaCD(dCD_obj, type, cdObj, dataset);
            });
        }