public void SendToHistoricalConverterRemoveNullParameters(string type, int dataset) { DumpingBuffer dbObj = dbMock.Object; Assert.Throws <ArgumentNullException>(() => { dbObj.SendToHistoricalConverter(null, type, dataset); }); }
public void SendToHistoricalConverterRemoveBadParameters(string type, int dataset) { DumpingBuffer dbObj = dbMock.Object; Mock <CollectionDescription> cdMock = new Mock <CollectionDescription>(2); CollectionDescription cdObj = cdMock.Object; cdObj.Dpc.dumpingPropertyList[0].Code = "CODE_ANALOG"; cdObj.Dpc.dumpingPropertyList[1].Code = "CODE_DIGITAL"; Assert.Throws <ArgumentException>(() => { dbObj.SendToHistoricalConverter(cdObj, type, dataset); }); }
public void SendToHistoricalConverterRemoveGoodParameters(string type, int dataset) { DumpingBuffer dbObj = dbMock.Object; Mock <CollectionDescription> cdMock = new Mock <CollectionDescription>(dataset); CollectionDescription cdObj = cdMock.Object; cdObj.Dpc.dumpingPropertyList[0].Code = "CODE_ANALOG"; cdObj.Dpc.dumpingPropertyList[1].Code = "CODE_DIGITAL"; cdObj.Dpc.dumpingPropertyList[0].DumpingValue = new Value(); cdObj.Dpc.dumpingPropertyList[1].DumpingValue = new Value(); dbObj.SendToHistoricalConverter(cdObj, type, dataset); Assert.AreEqual(dbObj.DeltaCD.RemoveDic[dataset].Dpc.dumpingPropertyList[0].Code, cdObj.Dpc.dumpingPropertyList[0].Code); Assert.AreEqual(dbObj.DeltaCD.RemoveDic[dataset].Dpc.dumpingPropertyList[1].Code, cdObj.Dpc.dumpingPropertyList[1].Code); }