Exemplo n.º 1
0
        public void GetNetworkResultTest()
        {
            HSUPAResultManager target = new HSUPAResultManager();

            SimuResultStruct actual = target.GetNetworkResult(objList);
            SimuResultStruct expected = new SimuResultStruct();

            expected.DLLoad = 0;
            expected.DLThroughput = 0;
            expected.FailedSingleModeUserCount = 2;
            expected.NetType = NetWorkType.TDSCDMA;
            expected.SingleModeUserCount = 4;
            expected.SuccessMultiModeUserCount = 2;
            expected.SuccessSingleModeUserCount = 2;
            expected.ULLoad = 0.9f;
            expected.ULThroughput = 180;



            Assert.AreEqual(expected.NetType, actual.NetType);

            Assert.AreEqual(expected.SingleModeUserCount, actual.SingleModeUserCount);

            Assert.AreEqual(expected.ULLoad, actual.ULLoad);

            Assert.AreEqual(expected.ULThroughput, actual.ULThroughput);

        }
Exemplo n.º 2
0
        public void DoHSUPAResultManagerTest()
        {
            HSUPAResultManager target = new HSUPAResultManager();

            DataTable table = (DataTable)target.GetAverageResult(objList);
            string expCellName = "TDCell-1";
            string actCellName = (string)table.Rows[0][0];
            Assert.AreEqual(expCellName,actCellName);
            string expMulti = "2";
            string actMulti = (string)table.Rows[0][3];
            Assert.AreEqual(expMulti,actMulti);
            string expRot = "10";
            string actRot = (string)table.Rows[0][7];
            Assert.AreEqual(expRot,actRot);
            expCellName = "TDCell-2";
            actCellName = (string)table.Rows[1][0];
            Assert.AreEqual(expCellName,actCellName);
            string expLoad = "0.9";
            string actLoad = (string)table.Rows[1][4];
            Assert.AreEqual(expLoad,actLoad);
            string expBackNoise = "10";
            string actBackNoise=(string )table.Rows[1][7];
            Assert.AreEqual(expBackNoise,actBackNoise);
            NetVersion expNetVersion = NetVersion.TDHSUPA;
            NetVersion actNetVersion = target.NetVerison;
            Assert.AreEqual(expNetVersion,actNetVersion);
        }