/// <summary>
        /// Gets the template names for the <paramref name="metadata"/>. <paramref name="templateName"/>, if set,
        /// is used before any of the names from <see cref="TemplateNameSource"/>.
        /// </summary>
        /// <param name="metadata">The metadata.</param>
        /// <param name="templateName">Name of the template.</param>
        protected virtual IEnumerable <string> GetTemplateNames(ModelMetadata metadata, string templateName)
        {
            if (!string.IsNullOrEmpty(templateName))
            {
                yield return(templateName);
            }

            foreach (var name in TemplateNameSource.GetTemplateNames(metadata))
            {
                yield return(name);
            }
        }
 public TemplateNameSourceTests()
 {
     _typeExplorer     = new Mock <ITypeExplorer>(MockBehavior.Strict);
     _nameSource       = new TemplateNameSource(_typeExplorer.Object);
     _metadataProvider = new TestModelMetadataProvider();
 }