public void MyTestInitialize() { m_Index = 0; m_Name = "ULDCHRSCP"; m_Context = new Context(); m_Case = new ULDCHRSCPCase(); TrueFalseMatrix matrix = new TrueFalseMatrix(4, 4, 0.0, 200, 50, true); TDPredictionGroup group = MockGroupAndCell.MockTDPredicGroup(); group.tdUIParam.CurrentTimeSlot = 2; IACell cell = MockGroupAndCell.CreateTDCell(); InitTerminal(group); LinkLossAssist.Init(); IProjectManager projectMgr = ServiceHelper.Lookup<IProjectManager>(ProjectSingleton.CurrentProject.AppContext); string path = projectMgr.CurrentProjectLossPath; string absolutePath = ResultFilePath.CreateFilePath(path, group.Name, group.Region.Name, TDPredictionStudyType.Best_Server.ToString()); string relativePath = ResultFilePath.CreateRelativePath(group.Name, group.Region.Name, TDPredictionStudyType.Best_Server.ToString()); ShortResultStruct srs = ShortResultStruct.DefaultMax; ValueMatrixShort BestServerCellID = ValueMatrixAssist.GenerateByTrueFalseMatrix(matrix, absolutePath, relativePath, srs); BestServerCellID[0] = cell.ID; m_Context.Add(ContextKeys.CurrentCalcCell, cell); m_Context.Add(ContextKeys.Group, group); m_Context.Add(ContextKeys.TDBestServerCellID, BestServerCellID); m_Context.Add(ContextKeys.CellList, InitCellList(cell)); m_Context.Add(ContextKeys.TFMatrix, matrix); m_Context.Add(ContextKeys.ApplicationContext, ProjectSingleton.CurrentProject.AppContext); }
public void MyTestInitialize() { m_Index = 0; m_Name = "ULDCHRSCP"; m_Context = new Context(); m_Case = new ULDCHRSCPCase(); TrueFalseMatrix matrix = new TrueFalseMatrix(4, 4, 0.0, 200, 50, true); TDPredictionGroup group = MockGroupAndCell.MockTDPredicGroup(); IACell cell = MockGroupAndCell.CreateTDCell(); m_Teminal = new Terminal(); group.TrafficTerminal =m_Teminal; List<NetworkTerminal> netTerminalList=new List<NetworkTerminal>(); m_Teminal.NetTerminalList = netTerminalList; TDTerminal tdTeminal = new TDTerminal(); tdTeminal.Attenuation = 45f; tdTeminal.MaxTxPower = 21; tdTeminal.NetType = NetWorkType.TDSCDMA; netTerminalList.Add(tdTeminal); List<IACell> celllist = new List<IACell>(); celllist.Add(new TDSCDMACarrier()); celllist.Add(new TDSCDMACarrier()); double[] x = { 100, 150 }; double[] y = { 100, 100 }; celllist = MockCellList.CreateCellList(celllist, x, y); celllist.Add(cell); LinkLossAssist.Init(); IProjectManager projectMgr = ServiceHelper.Lookup<IProjectManager>(ProjectSingleton.CurrentProject.AppContext); string path = projectMgr.CurrentProjectLossPath; string absolutePath2 = ResultFilePath.CreateFilePath(path, group.Name, group.Region.Name, TDPredictionStudyType.Best_Server.ToString()); string relativePath2 = ResultFilePath.CreateRelativePath(group.Name, group.Region.Name, TDPredictionStudyType.Best_Server.ToString()); ShortResultStruct srs2 = ShortResultStruct.DefaultMax; ValueMatrixShort BestServerCellID = ValueMatrixAssist.GenerateByTrueFalseMatrix(matrix, absolutePath2, relativePath2, srs2); BestServerCellID[0] = cell.ID; m_Context.Add(ContextKeys.CurrentCalcCell, cell); m_Context.Add(ContextKeys.Group, group); m_Context.Add(ContextKeys.TDBestServerCellID, BestServerCellID); m_Context.Add(ContextKeys.CellList, celllist); m_Context.Add(ContextKeys.TFMatrix, matrix); m_Context.Add(ContextKeys.ApplicationContext, ProjectSingleton.CurrentProject.AppContext); }