public SaveResultsToDirectory ( |
||
theResults | ||
directory | string | |
Résultat | void |
public void save_and_load_the_history_for_a_hierarchy() { if (Directory.Exists("results-dir")) { Directory.Delete("results-dir", true); } Hierarchy hierarchy = DataMother.BuildHierarchy( @" s1/t4,Success s1/t5,Success s1/t6,Failure s1/s2/t7,Success s1/s2/t8,Failure s1/s2/s3/t9,Success s1/s2/s3/t10,Success s1/s2/s3/s4/t11,Success s5/t12,Success s5/s6/t13,Success s5/s6/s7/t14,Success s5/s6/s7/s8/t15,Success s9/t16,Success s9/t17,Success s9/t18,Success "); var persistor = new ResultPersistor(); persistor.SaveResultsToDirectory(hierarchy.GetFullResults(), "results-dir"); var results = persistor.LoadResults("results-dir"); hierarchy.GetAllTests().Each(x => { results[x].ShouldNotBeNull(); }); }