Exemple #1
0
        public void DataDictsWithSameKeyAndEmptyDataItemAreEqual()
        {
            _compData1["key"] = new ComponentData();
            _compData2["key"] = new ComponentData();

            Assert.IsTrue(VoicepackComparer.EqualComponentData(_compData1, _compData2));
        }
Exemple #2
0
        public void DataDictWithSameSizeButDifferentKeysAreNotEqual()
        {
            _compData1["key"]      = new ComponentData();
            _compData2["otherKey"] = new ComponentData();

            Assert.IsFalse(VoicepackComparer.EqualComponentData(_compData1, _compData2));
        }
Exemple #3
0
        public void DataDicsWithSameKeyAndSameDataItemSizesAreEqual()
        {
            const int dataItemsSize = 5;

            _compData1["key"] = new ComponentData()
            {
                data = new byte[dataItemsSize]
            };
            _compData2["key"] = new ComponentData()
            {
                data = new byte[dataItemsSize]
            };

            Assert.IsTrue(VoicepackComparer.EqualComponentData(_compData1, _compData2));
        }
Exemple #4
0
        public void DataDicsWithSameKeyButDifferentDataItemSizesAreNotEqual()
        {
            const int dataItemsSize = 5;

            _compData1["key"] = new ComponentData()
            {
                data = new byte[dataItemsSize]
            };
            _compData2["key"] = new ComponentData()
            {
                data = new byte[dataItemsSize + 1]
            };

            Assert.IsFalse(VoicepackComparer.EqualComponentData(_compData1, _compData2));
        }
Exemple #5
0
        public void DataDictWithDifferentSizeAreNotEqual()
        {
            _compData1["key"] = new ComponentData();

            Assert.IsFalse(VoicepackComparer.EqualComponentData(_compData1, _compData2));
        }
Exemple #6
0
 public void EmptyComponentDataDictsAreEqual()
 {
     Assert.IsTrue(VoicepackComparer.EqualComponentData(_compData1, _compData2));
 }
Exemple #7
0
 public void NullAndEmptyDataDictAreNotEqual()
 {
     Assert.IsFalse(VoicepackComparer.EqualComponentData(null, _compData1));
 }
Exemple #8
0
 public void NullComponentDataIsEqual()
 {
     Assert.IsTrue(VoicepackComparer.EqualComponentData(null, null));
 }