Пример #1
0
        public void TestRadioResourceConfigDedicated_Switchs()
        {
            RadioResourceConfigDedicated signal = new RadioResourceConfigDedicated(signalString);

            Assert.IsTrue(signal.SrbToAddModListPresent);
            Assert.IsFalse(signal.DrbToAddModListPresent);
            Assert.IsFalse(signal.DrbToReleaseListPresent);
            Assert.IsTrue(signal.MacMainConfigPresent);
            Assert.IsTrue(signal.SpsConfigPresent);
            Assert.IsTrue(signal.PhysicalConfigDedicatedPresent);
            Assert.AreEqual(signal.SrbToAddModListLength, 1);
        }
Пример #2
0
        public void Test_RadioResource_Dedicated(string source, long transId, long srbId,
                                                 int drbs, long[] epsId, long[] drbId,
                                                 bool macConfigExist, bool phyConfigExist)
        {
            BitArrayInputStream stream = source.GetInputStream();

            Assert.AreEqual(stream.ReadBits(5), 4);
            RRCConnectionReconfiguration result = RRCConnectionReconfiguration.PerDecoder.Instance.Decode(stream);

            Assert.IsNotNull(result);
            Assert.AreEqual(result.rrc_TransactionIdentifier, transId);
            Assert.IsNotNull(result.criticalExtensions);
            Assert.IsNotNull(result.criticalExtensions.c1);
            Assert.IsNull(result.criticalExtensions.criticalExtensionsFuture);
            Assert.IsNotNull(result.criticalExtensions.c1.rrcConnectionReconfiguration_r8);
            RadioResourceConfigDedicated mainPart =
                result.criticalExtensions.c1.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated;

            Assert.IsNotNull(mainPart);
            Assert.IsNotNull(mainPart.srb_ToAddModList);
            Assert.AreEqual(mainPart.srb_ToAddModList.Count, 1);
            SRB_ToAddMod srb = mainPart.srb_ToAddModList[0];

            Assert.AreEqual(srb.srb_Identity, srbId);
            Assert.IsNotNull(mainPart.drb_ToAddModList);
            Assert.AreEqual(mainPart.drb_ToAddModList.Count, drbs);
            for (int i = 0; i < drbs; i++)
            {
                DRB_ToAddMod drb = mainPart.drb_ToAddModList[i];
                Assert.AreEqual(drb.eps_BearerIdentity, epsId[i]);
                Assert.AreEqual(drb.drb_Identity, drbId[i]);
            }
            if (macConfigExist)
            {
                Assert.IsNotNull(mainPart.mac_MainConfig);
            }
            else
            {
                Assert.IsNull(mainPart.mac_MainConfig);
            }
            if (phyConfigExist)
            {
                Assert.IsNotNull(mainPart.physicalConfigDedicated);
            }
            else
            {
                Assert.IsNull(mainPart.physicalConfigDedicated);
            }
        }
Пример #3
0
        public void Test_RadioResource_PhysicalConfigDecicated(string source, string description)
        {
            BitArrayInputStream stream = source.GetInputStream();

            Assert.AreEqual(stream.readBits(5), 4);
            RRCConnectionReconfiguration result = RRCConnectionReconfiguration.PerDecoder.Instance.Decode(stream);

            Assert.IsNotNull(result);
            Assert.IsNotNull(result.criticalExtensions);
            Assert.IsNotNull(result.criticalExtensions.c1);
            Assert.IsNull(result.criticalExtensions.criticalExtensionsFuture);
            Assert.IsNotNull(result.criticalExtensions.c1.rrcConnectionReconfiguration_r8);
            RadioResourceConfigDedicated config =
                result.criticalExtensions.c1.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated;

            Assert.IsNotNull(config);
            Assert.IsNotNull(config.physicalConfigDedicated);
            Assert.AreEqual(config.physicalConfigDedicated.GetOutputs(), description);
        }
Пример #4
0
        public void Test_RadioResource_Drb(string source, string[] description)
        {
            BitArrayInputStream stream = source.GetInputStream();

            Assert.AreEqual(stream.readBits(5), 4);
            RRCConnectionReconfiguration result = RRCConnectionReconfiguration.PerDecoder.Instance.Decode(stream);

            Assert.IsNotNull(result);
            Assert.IsNotNull(result.criticalExtensions);
            Assert.IsNotNull(result.criticalExtensions.c1);
            Assert.IsNull(result.criticalExtensions.criticalExtensionsFuture);
            Assert.IsNotNull(result.criticalExtensions.c1.rrcConnectionReconfiguration_r8);
            RadioResourceConfigDedicated config =
                result.criticalExtensions.c1.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated;

            Assert.IsNotNull(config);
            Assert.IsNotNull(config.drb_ToAddModList);
            for (int i = 0; i < config.drb_ToAddModList.Count; i++)
            {
                Assert.AreEqual(config.drb_ToAddModList[i].GetOutputs(), description[i]);
            }
        }