public void init_test() { var om = new OptionModel(); om.Init(); Assert.IsNotNull(om.Traders); }
public void flush_test() { var om = new OptionModel(); om.Init(); var q = om.Traders.Where(a => a.Name == "hello0").FirstOrDefault(); q.Account.BailAccount.Sum = 9; q.Account.BailAccount.Frozen = 8; //q.Account.BailAccount.MaintainCount = 7; om.Flush(); var db = new OptionDbCtx(); var t = db.Set <BailAccount>().Where(a => a.Id == q.Id).FirstOrDefault(); Assert.AreEqual(t.Sum, 9); Assert.AreEqual(t.Frozen, 8); //Assert.AreEqual(t.MaintainCount, 7); }