public void MyTestInit() { m_Context = MockContext.CreatContext(); m_Param = new R99_CommonParam(m_Context); m_CellList = new List<UMTSSimCell>(); UMTSSimCell R99Cell = MockCell.CreatUMTSSimCell(0, 0); UMTSSimUser ulUser = MockUser.CreatUMTSCSUser(); ulUser.IsPolyModelUser = true; UMTSSimUser ulUser2 = MockUser.CreatUMTSCSUser(); UMTSSimCell umtsCell = MockCell.CreatUMTSSimCell(0, 50); LinkParam linkParam = new LinkParam(umtsCell); ulUser2.ServedLinkSet.Add(1, linkParam); UMTSSimUser dlUser = MockUser.CreatUMTSCSUser(); dlUser.LinkType = LinkType.Downlink; UMTSSimUser dlUser2 = MockUser.CreatUMTSCSUser(); dlUser2.ServedLinkSet.Add(1, linkParam); R99Cell.ServerdR99User.Add(ulUser); R99Cell.ServerdR99User.Add(dlUser); R99Cell.ServerdR99User.Add(dlUser2); UMTSSimCell R99andDPACell1 = MockCell.CreatUMTSSimCell(0, 100); R99andDPACell1.CellType = CarrierTypeOfUMTS.R99AndHSDPA; UMTSSimCell R99andDPACell2 = MockCell.CreatUMTSSimCell(50, 100); R99andDPACell2.NECell.DynHSDPAPower = true; R99andDPACell2.HSDPA_UsedHsscchPower = 30f; R99andDPACell2.CellType = CarrierTypeOfUMTS.R99AndHSDPA; m_CellList.Add(R99Cell); m_CellList.Add(R99andDPACell1); m_CellList.Add(R99andDPACell2); m_Param.CellList = m_CellList; }
public void MyTestInitialize() { m_Context = MockContext.CreatContext(); m_Param = new R99_CommonParam(m_Context); m_UlUser = MockUser.CreatUMTSCSUser(); m_UlUser.UserState = UserState.Serving; m_UlUser.ServedLinkSet[0].ServeSet.CurRxPower = 50000f; m_UlUser.ServedLinkSet[0].ULCIR = 0.0001f; LinkParam linkParam = new LinkParam(MockCell.CreatUMTSSimCell(50, 50)); linkParam.ServeSet.CurRxPower = 40000f; linkParam.ULCIR = 0.00001f; m_UlUser.ServedLinkSet.Add(1, linkParam); m_DlUser = MockUser.CreatUMTSCSUser(); m_DlUser.UserState = UserState.Serving; m_DlUser.LinkType = LinkType.Downlink; m_DlUser.ServedLinkSet[0].DLTrafTxPower = 100f; m_Param.UserCol.AccessedUser.Add(m_UlUser); m_Param.UserCol.AccessedUser.Add(m_DlUser); }
[Test]//下行码字受限 public void ExecuteTest_DL_1() { R99_PowerCtrl PowerCtrl = new R99_PowerCtrl(m_Param); UMTSSimCell umtsSimCell = MockCell.CreatUMTSSimCell(50, 100); LinkParam linkparam = new LinkParam(umtsSimCell); m_DlUser.ServedLinkSet.Add(1, linkparam); linkparam.Success = true; PowerCtrl.Execute(); Assert.AreEqual(m_DlUser.DropReason, DropReason.DLCodeRestriction); }
[Test]//下行EbNt受限 public void ExecuteTest_DL_4() { UMTSSimCell umtsSimCell = MockCell.CreatUMTSSimCell(50, 100); umtsSimCell.CurTxPower = 100f; LinkParam linkparam = new LinkParam(umtsSimCell); linkparam.Success = true; linkparam.ServeSet.R99AvailableCode = 5; m_DlUser.ServedLinkSet.Add(1, linkparam); m_DlUser.ServedLinkSet[0].Success = true; m_DlUser.Terminal.RakeEfficiency = 0.000000001f; m_DlUser.ServedLinkSet[0].ServeSet.R99AvailableCode = 5; R99_PowerCtrl PowerCtrl = new R99_PowerCtrl(m_Param); PowerCtrl.Execute(); Assert.AreEqual(m_DlUser.DropReason, DropReason.DLEbNtRestriction); }