Beispiel #1
0
        public void EraseEpcsTest()
        {
            QuickUsb target = new QuickUsb("QUSB-0");
            byte     nSS    = 0;

            QuickUsb.EpcsFlags        flags    = QuickUsb.EpcsFlags.None;
            QuickUsb.ProgressDelegate callback = null;
            IntPtr tag      = IntPtr.Zero;
            bool   expected = true;
            bool   actual;

            actual = target.EraseEpcs(nSS, flags, callback, tag);
            Assert.AreEqual(expected, actual);
        }
Beispiel #2
0
        public void IdentifyEpcsTest()
        {
            QuickUsb target = new QuickUsb("QUSB-0");
            byte     nSS    = 0;

            QuickUsb.EpcsId epcsId;
            QuickUsb.EpcsId epcsIdExpected = QuickUsb.EpcsId.Epcs1;
            uint            epcsByteSize, epcsByteSizeExpected = (1048576 / 8) * 1;

            QuickUsb.EpcsFlags flags = QuickUsb.EpcsFlags.None;
            bool expected = true;
            bool actual;

            actual = target.IdentifyEpcs(nSS, out epcsId, out epcsByteSize, flags);
            Assert.AreEqual(expected, actual);
            Assert.AreEqual(epcsIdExpected, epcsId);
            Assert.AreEqual(epcsByteSizeExpected, epcsByteSize);
        }
Beispiel #3
0
        public void ConfigureVerifyEpcsTest()
        {
            QuickUsb target   = new QuickUsb("QUSB-0");
            byte     nSS      = 0;
            string   filePath = @"C:\epcsTestData.rbf";

            QuickUsb.EpcsFlags        flags    = QuickUsb.EpcsFlags.None;
            QuickUsb.ProgressDelegate callback = null;
            IntPtr tag      = IntPtr.Zero;
            bool   expected = true;
            bool   actual;

            actual = target.ConfigureEpcs(nSS, filePath, flags, callback, tag);
            Assert.AreEqual(expected, actual);

            actual = target.VerifyEpcs(nSS, filePath, flags, callback, tag);
            Assert.AreEqual(expected, actual);
        }