public void TestStore() { // .fontindex = 0 // .formatindex = 0 // .celloptions = fffffff5 // .Islocked = true // .Ishidden = false // .Recordtype= 1 // .parentidx = fff // .alignmentoptions= 20 // .alignment = 0 // .wraptext = false // .valignment= 2 // .justlast = 0 // .rotation = 0 // .indentionoptions= 0 // .indent = 0 // .shrinktoft= false // .mergecells= false // .Readngordr= 0 // .formatflag= false // .fontflag = false // .prntalgnmt= false // .borderflag= false // .paternflag= false // .celloption= false // .borderoptns = 0 // .lftln = 0 // .rgtln = 0 // .Topln = 0 // .btmln = 0 // .paleteoptns = 0 // .leftborder= 0 // .rghtborder= 0 // .diag = 0 // .paleteoptn2 = 0 // .Topborder = 0 // .botmborder= 0 // .adtldiag = 0 // .diaglnstyl= 0 // .Fillpattrn= 0 // .Fillpaloptn = 20c0 // .foreground= 40 // .background= 41 ExtendedFormatRecord record = new ExtendedFormatRecord(); record.FontIndex = (/*setter*/(short)0); record.FormatIndex = (/*setter*/(short)0); record.IsLocked = (/*setter*/true); record.IsHidden = (/*setter*/false); record.XFType = (/*setter*/(short)1); record.ParentIndex = (/*setter*/(short)0xfff); record.VerticalAlignment = (/*setter*/(short)2); record.FillForeground = (/*setter*/(short)0x40); record.FillBackground = (/*setter*/(short)0x41); byte[] recordBytes = record.Serialize(); Assert.AreEqual(recordBytes.Length - 4, data.Length); for (int i = 0; i < data.Length; i++) Assert.AreEqual(data[i], recordBytes[i + 4], "At offset " + i); }
public void TestCloneOnto() { ExtendedFormatRecord base1 = CreateEFR(); ExtendedFormatRecord other = new ExtendedFormatRecord(); other.CloneStyleFrom(base1); byte[] recordBytes = other.Serialize(); Assert.AreEqual(recordBytes.Length - 4, data.Length); for (int i = 0; i < data.Length; i++) Assert.AreEqual(data[i], recordBytes[i + 4], "At offset " + i); }