public void VerifyJetSetcolumnInequality() { var setcolumns = new JET_SETCOLUMN[10]; for (int i = 0; i < setcolumns.Length; ++i) { setcolumns[i] = new JET_SETCOLUMN { cbData = 6, columnid = new JET_COLUMNID { Value = 1 }, err = JET_wrn.Success, grbit = SetColumnGrbit.None, ibData = 0, ibLongValue = 0, itagSequence = 1, pvData = BitConverter.GetBytes(0xBADF00DL) }; } int j = 1; setcolumns[j++].cbData++; setcolumns[j++].columnid = JET_COLUMNID.Nil; setcolumns[j++].err = JET_wrn.ColumnTruncated; setcolumns[j++].grbit = SetColumnGrbit.UniqueMultiValues; setcolumns[j++].ibData++; setcolumns[j++].ibLongValue++; setcolumns[j++].itagSequence++; setcolumns[j++].pvData = BitConverter.GetBytes(1L); setcolumns[j++] = new JET_SETCOLUMN(); Debug.Assert(j == setcolumns.Length, "Didn't fill in all entries of setcolumns"); VerifyAll(setcolumns); }
public void VerifyCheckDataSizeThrowsExceptionWhenIbDataIsNonZeroAndPvDataIsNull() { var setcolumn = new JET_SETCOLUMN { ibData = 1, }; setcolumn.CheckDataSize(); }
public void VerifyCheckDataSizeThrowsExceptionWhenItagSequenceIsNegative() { var setcolumn = new JET_SETCOLUMN { itagSequence = -1, }; setcolumn.CheckDataSize(); }
public void VerifyValidateThrowsExceptionWhenItagSequenceIsNegative() { var setcolumn = new JET_SETCOLUMN { itagSequence = -1, }; setcolumn.Validate(); }
public void VerifyCheckDataSizeThrowsExceptionWhenIbLongValueIsNegative() { var setcolumn = new JET_SETCOLUMN { ibLongValue = -1, }; setcolumn.CheckDataSize(); }
public void VerifyValidateThrowsExceptionWhenIbLongValueIsNegative() { var setcolumn = new JET_SETCOLUMN { ibLongValue = -1, }; setcolumn.Validate(); }
public void VerifyValidateThrowsExceptionWhenPvDataIsNull() { var setcolumn = new JET_SETCOLUMN { cbData = 1, }; setcolumn.Validate(); }
public void VerifyCheckThrowsExceptionWhenPvDataIsNull() { var setcolumn = new JET_SETCOLUMN { cbData = 1, }; setcolumn.CheckDataSize(); }
public void VerifyCheckDataSizeThrowsExceptionWhenCbDataIsTooLong() { var setcolumn = new JET_SETCOLUMN { cbData = 100, pvData = new byte[9], }; setcolumn.CheckDataSize(); }
public void VerifyCheckDataSizeThrowsExceptionWhenIbDataIsNegative() { var setcolumn = new JET_SETCOLUMN { ibData = -1, pvData = new byte[1], }; setcolumn.CheckDataSize(); }
public void JetSetColumnToString() { var value = new JET_SETCOLUMN { columnid = new JET_COLUMNID { Value = 0x1234F } }; Assert.AreEqual("JET_SETCOLUMN(0x1234f,<null>,ibLongValue=0,itagSequence=0)", value.ToString()); }
public void VerifyValidateThrowsExceptionWhenCbDataIsNegative() { var setcolumn = new JET_SETCOLUMN { cbData = -1, pvData = new byte[1], }; setcolumn.Validate(); }
public void VerifyJetSetcolumnEquality() { var x = new JET_SETCOLUMN { cbData = 4, pvData = BitConverter.GetBytes(99) }; var y = new JET_SETCOLUMN { cbData = 4, pvData = BitConverter.GetBytes(99) }; TestContentEquals(x, y); }
public void Setup() { this.managed = new JET_SETCOLUMN { cbData = 1, columnid = new JET_COLUMNID { Value = 2 }, grbit = SetColumnGrbit.AppendLV, ibLongValue = 3, itagSequence = 4, }; this.native = this.managed.GetNativeSetcolumn(); }