Exemplo n.º 1
0
        public static void WriteFinalToFile(ITestResults foo, string fileName)
        {
            var serializer =
                new XmlSerializer(foo.GetType());

            using (var writer = new StreamWriter(string.Format("{0}{1}.xml", fileName, DateTime.Now.Ticks)))
            {
                serializer.Serialize(writer, foo);
            }
        }
Exemplo n.º 2
0
        public static void WriteToFile(ITestResults foo, string fileName)
        {
            var serializer =
                new XmlSerializer(foo.GetType());

            var writer = new StreamWriter(string.Format("{0}-{1}.xml", fileName, DateTime.Now.Ticks));

            serializer.Serialize(writer, foo);
            writer.Close();
            writer.Dispose();
        }
Exemplo n.º 3
0
        public static void WriteToFile(ITestResults foo, string fileName)
        {
            XmlSerializer serializer = new XmlSerializer(foo.GetType());

            Directory.CreateDirectory(Configuration.NUnitModifiedTestResultLocation);

            using (var writer =
                       new StreamWriter(string.Format("{0}{1}-{2}.xml", Configuration.NUnitModifiedTestResultLocation, fileName, DateTime.Now.Ticks)))
            {
                serializer.Serialize(writer, foo);
            }
        }
Exemplo n.º 4
0
        public void GetOutput(ITestResults results)
        {
            var type = results.GetType();

            foreach (var property in type.GetProperties())
            {
                if (property.GetValue(results) is DateTime propertyDate)
                {
                    Console.Write($"{property.Name}: {propertyDate:dd/MM/yyyy} ");
                }
                else
                {
                    Console.Write($"{property.Name}: {property.GetValue(results)} ");
                }
            }

            Console.WriteLine();
        }
Exemplo n.º 5
0
        public static void WriteToFile(ITestResults foo, string fileName)
        {
            var serializer =
                new XmlSerializer(foo.GetType());

            var writer = new StreamWriter(string.Format("{0}-{1}.xml", fileName, DateTime.Now.Ticks));

            serializer.Serialize(writer, foo);
            writer.Close();
            writer.Dispose();
        }
Exemplo n.º 6
0
        public static void WriteFinalToFile(ITestResults foo, string fileName)
        {
            var serializer =
                new XmlSerializer(foo.GetType());

            using (var writer = new StreamWriter(string.Format("{0}{1}.xml", fileName, DateTime.Now.Ticks)))
            {
                serializer.Serialize(writer, foo);
            }
        }
Exemplo n.º 7
0
        public static void WriteToFile(ITestResults foo, string fileName)
        {
            XmlSerializer serializer = new XmlSerializer(foo.GetType());
            Directory.CreateDirectory(Configuration.NUnitModifiedTestResultLocation);

            using (var writer =
                new StreamWriter(string.Format("{0}{1}-{2}.xml", Configuration.NUnitModifiedTestResultLocation, fileName, DateTime.Now.Ticks)))
            {
                serializer.Serialize(writer, foo);
            }
        }