예제 #1
0
        public void SetData_Test_Successful()
        {
            CMdlFile obj = Setup("BINVRSN{\r\n    1\r\n}\r\nFRMERootNode\0", out byte[] cont);

            CMdlFile.MdlFileError result = obj.SetData(cont);

            Assert.IsTrue(CMdlFile.MdlFileError.NoError == result);
        }
예제 #2
0
        public void LoadFile_Test_ErrorNoFile()
        {
            CMdlFile obj = new CMdlFile();

            CMdlFile.MdlFileError result = obj.LoadFile(@"c:\somePath\invalid.file");

            Assert.IsTrue(result == CMdlFile.MdlFileError.NoFileError);
        }
예제 #3
0
        public void SetData_Test_ErrorIncompatible()
        {
            CMdlFile obj = Setup("BINVRSN{\r\n    2\r\n}\r\n", out byte[] cont);

            CMdlFile.MdlFileError result = obj.SetData(cont);

            Assert.IsTrue(CMdlFile.MdlFileError.IncompatibleError == result);
        }
예제 #4
0
        public void SetData_Test_ErrorNoContent()
        {
            CMdlFile obj = Setup("BINVRSN{\r\n    1\r\n}\r\n", out byte[] cont);

            CMdlFile.MdlFileError result = obj.SetData(cont);

            Assert.IsTrue(CMdlFile.MdlFileError.NoContentError == result);
        }
예제 #5
0
        public void SetData_Test_ErrorEmpty()
        {
            CMdlFile obj = new CMdlFile();

            CMdlFile.MdlFileError result = obj.SetData(new byte[0]);

            Assert.IsTrue(CMdlFile.MdlFileError.EmptyFileError == result);
        }
예제 #6
0
        public void SetData_Test_ErrorInvalid()
        {
            CMdlFile obj = new CMdlFile();

            CMdlFile.MdlFileError result = obj.SetData(null);

            Assert.IsTrue(CMdlFile.MdlFileError.InvalidDataError == result);
        }
예제 #7
0
        public void LoadFile_Test_Success()
        {
            CMdlFile obj      = new CMdlFile();
            string   fullPath = Path.Combine(Path.GetFullPath(@"..\..\input"), "test_root.mdl");

            CMdlFile.MdlFileError result = obj.LoadFile(fullPath);

            Assert.IsTrue(CMdlFile.MdlFileError.NoError == result, String.Format("Unexpected result ({0}) loading file {1}", ((int)result).ToString(), fullPath));
        }