Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit 9081a01

Browse files
committed
Added failing unit test for oracle select byte[] issue
1 parent ecbc52f commit 9081a01

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

src/ServiceStack.OrmLite.Oracle.Tests/OracleParamTests.cs

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ private void DropAndCreateTables(IDbConnection db)
1818

1919
db.CreateTable<ParamTestBO>(true);
2020
db.CreateTable<ParamRelBO>(true);
21+
db.CreateTable<ParamByteBO>(true);
2122
}
2223

2324
[Test]
@@ -226,6 +227,26 @@ public void ORA_ParamTestSelectLambdaComplex()
226227
}
227228
}
228229

230+
[Test]
231+
public void ORA_ParamByteTest()
232+
{
233+
using (var db = ConnectionString.OpenDbConnection())
234+
{
235+
DropAndCreateTables(db);
236+
237+
db.DeleteAll<ParamByteBO>();
238+
var bo1 = new ParamByteBO() { Id = 1, Data = new byte[] { 1, 25, 43, 3, 1, 66, 82, 23, 11, 44, 66, 22, 52, 62, 76, 19, 30, 91, 4 } };
239+
240+
db.InsertParam(bo1);
241+
var bo1Check = db.SelectParam<ParamByteBO>(s => s.Id == bo1.Id).Single();
242+
243+
Assert.AreEqual(bo1.Id, bo1Check.Id);
244+
Assert.AreEqual(bo1.Data, bo1Check.Data);
245+
246+
db.DeleteAll<ParamByteBO>();
247+
}
248+
}
249+
229250

230251

231252
public class ParamTestBO
@@ -251,5 +272,11 @@ public class ParamRelBO
251272
[Alias("InfoStr")]
252273
public string Info { get; set; }
253274
}
275+
276+
public class ParamByteBO
277+
{
278+
public int Id { get; set; }
279+
public byte[] Data { get; set; }
280+
}
254281
}
255282
}

0 commit comments

Comments
 (0)