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); }
public void LoadFile_Test_ErrorNoFile() { CMdlFile obj = new CMdlFile(); CMdlFile.MdlFileError result = obj.LoadFile(@"c:\somePath\invalid.file"); Assert.IsTrue(result == CMdlFile.MdlFileError.NoFileError); }
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); }
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); }
public void SetData_Test_ErrorEmpty() { CMdlFile obj = new CMdlFile(); CMdlFile.MdlFileError result = obj.SetData(new byte[0]); Assert.IsTrue(CMdlFile.MdlFileError.EmptyFileError == result); }
public void SetData_Test_ErrorInvalid() { CMdlFile obj = new CMdlFile(); CMdlFile.MdlFileError result = obj.SetData(null); Assert.IsTrue(CMdlFile.MdlFileError.InvalidDataError == result); }
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)); }