public void CompareContractWithSavedEntity(EnergyTrading.MDM.Contracts.Sample.Party contract) { int id = int.Parse(contract.Identifiers.Where(x => x.IsMdmId).First().Identifier); var savedEntity = new DbSetRepository(new DbContextProvider(() => new SampleMappingContext())).FindOne <MDM.Party>(id); this.CompareContractWithEntityDetails(contract, savedEntity); }
protected override void OnSetup() { ConfigurationManager.AppSettings["MdmCaching"] = false.ToString(); base.OnSetup(); this.party = PartyData.PostBasicEntity(); }
public void ConfirmEntitySaved(int id, EnergyTrading.MDM.Contracts.Sample.Party contract) { var savedEntity = new DbSetRepository(new DbContextProvider(() => new SampleMappingContext())).FindOne <MDM.Party>(id); contract.Identifiers.Add(new MdmId() { IsMdmId = true, Identifier = id.ToString() }); this.CompareContractWithEntityDetails(contract, savedEntity); }
public void CompareContractWithEntityDetails(EnergyTrading.MDM.Contracts.Sample.Party contract, MDM.Party entity) { PartyComparer.Compare(contract, entity); }
public void should_not_return_a_party() { EnergyTrading.MDM.Contracts.Sample.Party returnedParty = null; try { returnedParty = response.Content.ReadAsDataContract <EnergyTrading.MDM.Contracts.Sample.Party>(); } catch { } Assert.IsNull(returnedParty); }
protected static void SetAdditionalData(Party entity) { }