public CrmTestingContext(ScenarioContext scenarioContext) { RecordBuilder = new RecordBuilder(this); TableConverter = new TableConverter(this); LanguageCode = GetLanguageCode(); CommandProcessor = new CommandProcessor(scenarioContext); RecordCache = new AliasedRecordCache(GlobalTestingContext.ConnectionManager, GlobalTestingContext.Metadata); _targets = ConfigurationManager.AppSettings["Target"] .ToLower() .Split(';') .Select(splitted => splitted.Trim()) .ToArray(); }
public void Create(Entity entity, string alias, AliasedRecordCache recordCache) { entity.Id = CreateRecord(entity); recordCache.Add(alias, entity.ToEntityReference()); }