Пример #1
0
 public void failed_passed_is_failed()
 {
     CellResult r = new CellResult("skipped");
     r.addResult(failed());
     r.addResult(passed());
     Assert.AreEqual("failed", r.getStatus());
 }
Пример #2
0
        public static CellResult[] FindCells( Vector3 worldPos )
        {
            List<CellResult> cellResults = new List<CellResult>();
            foreach( Map map in _Maps )
            {
                if( !map.gameObject.activeInHierarchy || !map.enabled )
                {
                    continue;
                }

                Cell cell = map.GetCellFromWorldPos( worldPos );
                if( cell != null )
                {
                    CellResult cellResult = new CellResult();
                    cellResult.map = map;
                    cellResult.cell = cell;

                    cellResults.Add( cellResult );
                }
            }
            return cellResults.ToArray();
        }
Пример #3
0
        /// <summary>
        /// 縦幅を取得。
        /// </summary>
        /// <value>
        /// 縦幅。
        /// </value>
        /// <summary>
        /// Gets the height.
        /// </summary>
        /// <value>
        /// The height.
        /// </value>

        #else

        #endif

        #if NOSTALGIA_DOC_JA

        /// <summary>
        /// タイルセットを取得。
        /// </summary>
        /// <value>
        /// タイルセット。
        /// </value>
        /// <summary>
        /// Gets the tile set.
        /// </summary>
        /// <value>
        /// The tile set.
        /// </value>

        #else

        #endif

        #if NOSTALGIA_DOC_JA

        /// <summary>
        /// セルの配列を取得。
        /// </summary>
        /// <value>
        /// セルの配列。
        /// </value>
        /// <summary>
        /// Gets the cells.
        /// </summary>
        /// <value>
        /// The cells.
        /// </value>

        #else

        #endif

        #if NOSTALGIA_DOC_JA

        /// <summary>
        /// チャンクの配列を取得。
        /// </summary>
        /// <value>
        /// チャンクの配列。
        /// </value>
        /// <summary>
        /// Gets the chunks.
        /// </summary>
        /// <value>
        /// The chunks.
        /// </value>

        #else

        #endif

        #if NOSTALGIA_DOC_JA

        /// <summary>
        /// マテリアルカラーの取得/設定。
        /// </summary>
        /// <summary>
        /// Gets or sets the material color.
        /// </summary>

        #else

        #endif

        #if NOSTALGIA_DOC_JA

        /// <summary>
        /// SortingLayerIDの取得/設定。
        /// </summary>
        /// <summary>
        /// Gets or sets the sortingLayerID.
        /// </summary>

        #else

        #endif

        #if NOSTALGIA_DOC_JA

        /// <summary>
        /// sortingOrderの取得/設定。
        /// </summary>
        /// <summary>
        /// Gets or sets the sortingOrder.
        /// </summary>

        #else

        #endif

        #region Methods

        public static CellResult FindCell( Vector3 worldPos )
        {
            foreach( Map map in _Maps )
            {
                if( !map.gameObject.activeInHierarchy || !map.enabled )
                {
                    continue;
                }

                Cell cell = map.GetCellFromWorldPos( worldPos );
                if( cell != null )
                {
                    CellResult cellResult = new CellResult();
                    cellResult.map = map;
                    cellResult.cell = cell;

                    return cellResult;
                }
            }

            return null;
        }
Пример #4
0
        public void ConvertListToDataTable_Test()
        {
            TDSimUser user1;
            user1 = MockDPAUser.CreatTDSimUser_CS();
            TDSimUser user2;
            user2 = MockDPAUser.CreatTDSimUser_CS();

            List<TDSimUser> tdPreUser = new List<TDSimUser>();
            tdPreUser.Add(user1);
            tdPreUser.Add(user2);
            DPAResult dpaResult = new DPAResult(tdPreUser);

            List<AccessedUserResult> accessedUserResultList = new List<AccessedUserResult>();
            List<UnAccessedUserResult> unAccessedUserResultList = new List<UnAccessedUserResult>();
            List<CellResult> cellResultList = new List<CellResult>();

            AccessedUserResult accessedUserResult = new AccessedUserResult();
            UnAccessedUserResult unAccessedUserResult = new UnAccessedUserResult();
            CellResult cellResult = new CellResult();

            accessedUserResult.BestServerName = "acc server";
            accessedUserResult.UserID = 1;

            unAccessedUserResult.AccessErrorType = "not fit";
            unAccessedUserResult.UserID = 2;

            cellResult.CellName = "cellResult Name";
            cellResult.HSDPAAceessErrorCount = 2;
            cellResult.HSDPAAvrgBlock = 0.12f;
            cellResult.HSDPAAvrgThrowput = 400000d;
            cellResult.HSDPAAvrgTxpower = 36f;
            cellResult.HSDPAReqMultiUserNum = 0;
            cellResult.HSDPAReqSingleUserNum = 2;
            cellResult.ServedMultiModeUserNum = 0;
            cellResult.ServedSingleModeUserNum = 2;
            cellResult.UnServedMultiModeUserNum = 0;
            cellResult.UnServedSingleModeUserNum = 0;

            accessedUserResultList.Add(accessedUserResult);
            unAccessedUserResultList.Add(unAccessedUserResult);
            cellResultList.Add(cellResult);

            dpaResult.CellResult = cellResultList;
            dpaResult.AccessedUserResult = accessedUserResultList;
            dpaResult.UnAccessedUserResult = unAccessedUserResultList;

            dpaResult.ConvertListToDataTable();
            Assert.AreEqual(dpaResult.DTList[0].Columns.Count, dpaResult.DTList[1].Columns.Count,(dpaResult.GetExcelResult().Count-1));


            HSDPAResultManager resultManager = new HSDPAResultManager();
            //IResult result = new MockIResult();
            //object obj = new object();
            //result = (IResult)dpaResult;
            //obj = result;
            //List<object> objList = new List<object>();
            //objList.Add(obj);

            //resultManager.DPAResultList.Add(dpaResult);

            //DataTable dt = (DataTable)(resultManager.GetAverageResult(objList));
            //Assert.AreEqual(dt.Columns.Count, 11);

            //SimuResultStruct simuResultStruct = new SimuResultStruct();
            //simuResultStruct = resultManager.GetNetworkResult(objList);
            //Assert.AreEqual(simuResultStruct.ULLoad, 0);

        }
Пример #5
0
 public void passed_skipped_is_skipped()
 {
     CellResult r = new CellResult("passed");
     r.addResult(skipped());
     Assert.AreEqual("skipped", r.getStatus());
 }
Пример #6
0
        /// <summary>
        /// Convert the cell to result  depends of cell type.
        /// </summary>
        /// <param name="cell"></param>
        /// <returns></returns>
        public CellResult ConvertCellToTypeResult(ICell cell)
        {
            CellResult result = cell.IsMined ? CellResult.Mine : CellResult.Number;

            return(result);
        }