コード例 #1
0
ファイル: TestStyleRecord.cs プロジェクト: zanhaipeng/npoi
        public void TestUnicodeReadName()
        {
            byte[] data = HexRead.ReadFromString(
                "11 00 09 00 01 38 5E C4 89 5F 00 53 00 68 00 65 00 65 00 74 00 31 00");
            RecordInputStream in1 = TestcaseRecordInputStream.Create(StyleRecord.sid, data);
            StyleRecord       sr  = new StyleRecord(in1);

            Assert.AreEqual("\u5E38\u89C4_Sheet1", sr.Name); // "<Conventional>_Sheet1"
            byte[] ser;
            try
            {
                ser = sr.Serialize();
            }
            catch (InvalidOperationException e)
            {
                if (e.Message.Equals("Incorrect number of bytes written - expected 27 but got 18"))
                {
                    throw new AssertionException("Identified bug 46385");
                }
                throw e;
            }
            TestcaseRecordInputStream.ConfirmRecordEncoding(StyleRecord.sid, data, ser);
        }
コード例 #2
0
ファイル: Repository.cs プロジェクト: basp/calico
 public int InsertStyle(StyleRecord rec)
 {
     throw new NotImplementedException();
 }