public void TestSimulation() { // Simulation simulation = dataCollectFacade.CreateNewSimulation(); simulation.RunningCard = RuncardCode; simulation.RunningCardSequence = 1; simulation.TranslateCard = RuncardCode; simulation.TranslateCard = "1"; simulation.SourceCard = RuncardCode; simulation.SourceCardSequence = 1; simulation.MOCode = "MO3"; simulation.ItemCode = "ITEM01"; simulation.ModelCode = "M01"; simulation.IDMergeRule = 1; simulation.IsComplete = "0"; simulation.LastAction = ActionType.DataCollectAction_GoMO; simulation.ProductStatus = "GOOD"; simulation.MaintainUser = "******"; simulation.MaintainDate = 20050520; simulation.MaintainTime = 90301; //simulation.m //this.persistBroker.Execute(String.Format("delete from TBLSIMULATION where RCARD = '{0}' and MOCODE='{1}'",RuncardCode,simulation.MOCode)); this.dataCollectFacade.DeleteSimulation(simulation); this.dataCollectFacade.AddSimulation(simulation); Simulation s2 = (Simulation)dataCollectFacade.GetSimulation(RuncardCode); Assert.AreEqual(s2.ToString(), simulation.ToString()); ///Angel zhu Add :simulation update simulation.RunningCard = RuncardCode; simulation.RunningCardSequence = 2; simulation.TranslateCard = RuncardCode; simulation.SourceCard = RuncardCode; simulation.SourceCardSequence = 2; simulation.MOCode = "MO2"; simulation.ItemCode = "ITEM02"; simulation.ModelCode = "M02"; simulation.IDMergeRule = 2; simulation.IsComplete = "0"; simulation.LastAction = ActionType.DataCollectAction_GoMO; simulation.ProductStatus = "GOOD"; simulation.MaintainUser = "******"; simulation.MaintainDate = 20050523; simulation.MaintainTime = 151606; this.dataCollectFacade.UpdateSimulation(simulation); Simulation stest = (Simulation)dataCollectFacade.GetSimulation(RuncardCode); Console.WriteLine(simulation.ToString()); Console.WriteLine(stest.ToString()); Assert.AreEqual(stest.ToString(), simulation.ToString()); }