Ejemplo n.º 1
0
        public string Run(Constructor constructor)
        {
            WriteConstructor writeConstructor = provider.GetRequiredService <WriteConstructor>();
            StringWriter     writer           = new StringWriter();

            writer.Run(writeConstructor, constructor);
            return(writer.ToString().RemoveCarriageReturn());
        }
Ejemplo n.º 2
0
        public void Run(Constructor constructor, string expected)
        {
            WriteConstructor writeConstructor = host.Provider.GetRequiredService <WriteConstructor>();
            StringWriter     writer           = new StringWriter();

            writer.Run(writeConstructor, constructor);
            string actual = writer.ToString().RemoveCarriageReturn();

            Assert.Equal(expected, actual);
        }