public void GetTableNameTest()
        {
            // Arrange.
            var process = new ReferenceProcessDefinition { SystemName = "TestProcess" };
            var field = new ReferenceFieldDefinition { SystemName = "TestField", DefinedIn = process };

            // Act / Assert.
            Assert.AreEqual("TestProcess", field.GetTableName());
        }
        public void GetColumnNameTest()
        {
            // Arrange.
            var frenchCulture = new CultureInfo("fr-FR");
            var spanishCulture = new CultureInfo("es-ES");
            var process = new ReferenceProcessDefinition { SystemName = "TestProcess" };
            process.SupportedLocalizations.Add(new LocalizationInfoAttribute(Constants.DefaultCultureName));
            process.SupportedLocalizations.Add(new LocalizationInfoAttribute(frenchCulture.Name));
            var simpleField = new ReferenceDisplayFieldDefinition { SystemName = "Field1", DefinedIn = process, AllowLocalizedData = false };
            var localizedField = new ReferenceDisplayFieldDefinition { SystemName = "Field2", DefinedIn = process, AllowLocalizedData = true };

            // Act / Assert.
            Assert.AreEqual("Field1", simpleField.GetColumnName(Constants.DefaultCultureName));
            Assert.AreEqual("Field1", simpleField.GetColumnName(frenchCulture.Name));
            Assert.AreEqual("Field1", simpleField.GetColumnName(spanishCulture.Name));

            Assert.AreEqual("Field2", localizedField.GetColumnName(Constants.DefaultCultureName));
            Assert.AreEqual("Field2_fr_FR", localizedField.GetColumnName(frenchCulture.Name));
            Assert.AreEqual("Field2", localizedField.GetColumnName(spanishCulture.Name));
        }
 /// <summary>
 /// Refs the get cte.
 /// <author>unknown</author>
 /// </summary>
 /// <param name="cteName">Name of the cte.</param>
 /// <param name="process">The process.</param>
 /// <param name="fields">The fields.</param>
 /// <param name="includeSearchFields">if set to <c>true</c> [include search fields].</param>
 /// <param name="includeDetailFields">if set to <c>true</c> [include detail fields].</param>
 /// <param name="availableFields">The available fields.</param>
 /// <param name="field">The field.</param>
 /// <returns>System.String.</returns>
 /// <exception cref="System.NotImplementedException"></exception>
 protected override string RefGetCte(
     string cteName,
     ReferenceProcessDefinition process,
     IEnumerable<ReferenceDisplayFieldDefinition> fields,
     bool includeSearchFields,
     bool includeDetailFields,
     out HashSet<string> availableFields,
     ReferenceFieldDefinition field = null)
 {
     availableFields = new HashSet<string>();
     return cteName;
 }
 /// <summary>
 /// Refs the add base process outer joins.
 /// <author>unknown</author>
 /// </summary>
 /// <param name="joinsString">The joins string.</param>
 /// <param name="tableAliases">The table aliases.</param>
 /// <param name="mainProcess">The main process.</param>
 /// <param name="path">The path.</param>
 /// <exception cref="System.NotImplementedException"></exception>
 protected override void RefAddBaseProcessOuterJoins(
     StringBuilder joinsString,
     TableAliasCollection tableAliases,
     ReferenceProcessDefinition mainProcess,
     string path = "")
 {
     throw new NotImplementedException();
 }