예제 #1
0
        public void ClearingForBytes()
        {
            byte[]            data   = { 2, 3, 4, 5 };
            CheckSumDataCRC32 csData = new CheckSumDataCRC32(data);

            Assert.IsNotNull(csData);

            csData.Clear();
            byte[] byData = csData.GetAsByteArray();
            Assert.IsNull(byData);
        }
예제 #2
0
        public void GetBytesFromBytes()
        {
            byte[]            data   = { 2, 3, 4, 5 };
            CheckSumDataCRC32 csData = new CheckSumDataCRC32(data);

            Assert.IsNotNull(csData);

            byte[] byData = csData.GetAsByteArray();
            Assert.IsNotNull(byData);
            Assert.AreEqual(byData.Length, CheckSumDataCRC32.Length);
            Assert.AreEqual(data, byData);
        }
예제 #3
0
        public void GetBytesFromString()
        {
            string            data   = "02030405";
            CheckSumDataCRC32 csData = new CheckSumDataCRC32(data);

            Assert.IsNotNull(csData);

            byte[] byData = csData.GetAsByteArray();
            byte[] veData = { 2, 3, 4, 5 };
            Assert.IsNotNull(byData);
            Assert.AreEqual(byData.Length, CheckSumDataCRC32.Length);
            Assert.AreEqual(veData, byData);
        }
예제 #4
0
        public void ClearingForBytes()
        {
            byte[] data = { 2, 3, 4, 5 };
            CheckSumDataCRC32 csData = new CheckSumDataCRC32(data);
            Assert.IsNotNull(csData);

            csData.Clear();
            byte[] byData = csData.GetAsByteArray();
            Assert.IsNull(byData);
        }
예제 #5
0
        public void GetBytesFromString()
        {
            string data = "02030405";
            CheckSumDataCRC32 csData = new CheckSumDataCRC32(data);
            Assert.IsNotNull(csData);

            byte[] byData = csData.GetAsByteArray();
            byte[] veData = { 2, 3, 4, 5 };
            Assert.IsNotNull(byData);
            Assert.AreEqual(byData.Length, CheckSumDataCRC32.Length);
            Assert.AreEqual(veData, byData);
        }
예제 #6
0
        public void GetBytesFromBytes()
        {
            byte[] data = { 2, 3, 4, 5 };
            CheckSumDataCRC32 csData = new CheckSumDataCRC32(data);
            Assert.IsNotNull(csData);

            byte[] byData = csData.GetAsByteArray();
            Assert.IsNotNull(byData);
            Assert.AreEqual(byData.Length, CheckSumDataCRC32.Length);
            Assert.AreEqual(data, byData);
        }