public void ExcelLoad_LoadRecordsFromSpreadsheet_AllCellsCorrect()
        {
            //arrange
            var loadExcel = new ExcelLoad();
            //act
            var result = loadExcel.LoadExcelFile(correctFilePath);

            // Assert
            Assert.Equal(10, result.Count());
        }
        public void ExcelLoad()
        {
            //arrange
            var loadExcel = new ExcelLoad();
            //act
            var result    = loadExcel.LoadExcelFile(correctFilePath);
            var foundName = result.Where(w => w.FirstName == testName).FirstOrDefault();

            // Assert
            Assert.Equal(testName, foundName.FirstName);
        }
示例#3
0
        static char[] SPRIT_EXCEL             = { ',', ';' }; //공백제거용
        // Start is called before the first frame update
        void Start()
        {
            m_PlayerAnime = GetComponent <Animator>();
            m_PlayerRigid = GetComponent <Rigidbody>();
            const string File = "Excel/0Player_Combo_Key";

            List <Dictionary <string, object> > tmp = ExcelLoad.Read(File);

            //for(int i = 0; i < tmp.Count; i++)
            //{
            //    //Index	Key
            //    string [] Key = tmp[i]["Key"].ToString().Split(SPRIT_EXCEL[0]);
            //    //"Key"의 밸류를 , 로 스플릿

            //    for(int j = 0; j < Key.Length; j++)
            //    {
            //        string [] Value = Key[i].Split(SPRIT_EXCEL[1]);
            //        //타입 단타 타입, 프레스 타입
            //    }

            //    //int KeyCount = int.Parse(Key);

            //    Player_Key[] Node = new Player_Key[KeyCount];//키 카운트
            //    for (int j = 0; j < KeyCount; j++)
            //    {
            //        string str = "Key" + j;
            //        string KeyValue = tmp[i][str].ToString(); //무슨 키/ 무슨 방식/ 얼마나
            //        string[] arrKey = KeyValue.Split(new char[] { '/' });

            //        Node[j].st_Key = int.Parse(arrKey[0]);  //무슨 키
            //        Node[j].st_Key_Input = int.Parse(arrKey[1]);    //무슨 입력 방식
            //        Node[j].st_Action_Trigger = int.Parse(arrKey[2]);   //무슨 액션 트리거
            //    }
            //    m_KeyList.Add(Node);
            //}
            //선택된 캐릭터는 게임매니저가 들고 있다.
        }