예제 #1
0
파일: Main.cs 프로젝트: zaurik/SeShell
        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);
            }
        }
예제 #2
0
파일: Main.cs 프로젝트: zaurik/SeShell
        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();
        }
예제 #3
0
파일: Utilities.cs 프로젝트: zaurik/SeShell
        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);
            }
        }
예제 #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();
        }
예제 #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();
        }
예제 #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);
            }
        }
예제 #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);
            }
        }