public void Submit_Tree_Success() { Order order = new Order { OrderID = 1, OrderDate = DateTime.Now }; Order_Detail d1 = new Order_Detail { ProductID = 1 }; Order_Detail d2 = new Order_Detail { ProductID = 2 }; Dictionary<string, int[]> detailsAssociation = new Dictionary<string, int[]>(); detailsAssociation.Add("Order_Details", new int[] { 2, 3 }); ChangeSetEntry[] changeSet = new ChangeSetEntry[] { new ChangeSetEntry { Id = 1, Entity = order, Operation = ChangeOperation.Insert, Associations = detailsAssociation }, new ChangeSetEntry { Id = 2, Entity = d1, Operation = ChangeOperation.Insert }, new ChangeSetEntry { Id = 3, Entity = d2, Operation = ChangeOperation.Insert } }; ChangeSetEntry[] resultChangeSet = this.ExecuteSubmit(TestConstants.CatalogUrl + "Submit", "Catalog", changeSet); Assert.Equal(3, resultChangeSet.Length); Assert.True(resultChangeSet.All(p => !p.HasError)); }
public void InsertOrderDetail(Order_Detail detail) { }