Esempio n. 1
0
        public static void Save(this ITestRun testRun, string path, string name = "")
        {
            Paths.Create(path);
            var fullPath = Path.Combine(path, name.Equals("") ? testRun.GetFileName() : name);

            using (var file = File.CreateText(fullPath))
            {
                var serializer = new JsonSerializer();
                serializer.Serialize(file, testRun);
            }
        }
Esempio n. 2
0
        public static void Save(this ITestRun testRun, string path, string name = "")
        {
            if (name.Equals(""))
            {
                name = testRun.GetFileName();
            }
            if (!Directory.Exists(path))
            {
                Directory.CreateDirectory(path);
            }
            var fullPath = Path.Combine(path, name);

            using (var file = File.CreateText(fullPath))
            {
                var serializer = new JsonSerializer();
                serializer.Serialize(file, testRun);
            }
        }