Ejemplo n.º 1
0
        public void WhenCallingDocumentTitleFromCurrentAssemblyItShouldSetupCorrectDocumentTitle()
        {
            var sc = new SwaggerUiConfig(new string[0], _ => "");

            sc.DocumentTitleFromCurrentAssembly();
            var templateParams = (Dictionary <string, string>)sc.GetType().GetField("_templateParams", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(sc);

            templateParams["%(DocumentTitle)"].Should().Be("Swagger UI - LSL.Swashbuckle.Tests");
        }