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

            writer.Run(writeConstructor, constructor);
            return(writer.ToString().RemoveCarriageReturn());
        }
        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);
        }