public void VerifyTableCreationSucceedsWithSupportedSerializer() { if (!this.Serializer.CanDeserialize(typeof(ComplexOrder))) { Assert.Ignore("Serialize does not support this data type"); } using (var db = new BlobDatabase(this.Serializer)) { db.CreateTable <ComplexOrder>(); var mapping = db.GetMapping <ComplexOrder>(); Assert.IsNotNull(mapping); Assert.AreEqual(4, mapping.Columns.Length); } }
public void VerifyTableCreationFailsWithNoSerializer() { NotSupportedException ex = null; using (var db = new BlobDatabase(null)) { try { var count = db.CreateTable <ComplexOrder>(); Assert.IsTrue(count == 0); Assert.IsNull(db.GetMapping <ComplexOrder>()); return; } catch (NotSupportedException e) { ex = e; } } Assert.IsNotNull(ex); }