public void Can_load_code_eventsource_from_file() { var str = FileSupport.GetFileContents(@"..\..\EventSource1.cfcs"); var root = RDom.CSharp.Load(str); Assert.IsNotNull(root); }
public void Can_load_prop_changed_code_from_file() { var str = FileSupport.GetFileContents(@"..\..\PropertyChanged1.cfcs"); var root = RDom.CSharp.Load(str); Assert.IsNotNull(root); }
public void GetFileContents_returns_contents() { var path = AppDomain.CurrentDomain.BaseDirectory; var file = Path.Combine(path, @"..\..\normal.kadcs"); var results = FileSupport.GetFileContents(file); Assert.IsTrue(results.StartsWith("using KadMan.Common;")); }
public void GetFileContents_returns_null_if_no_file() { var path = AppDomain.CurrentDomain.BaseDirectory; var file = Path.Combine(path, "normal.kadcx"); var results = FileSupport.GetFileContents(file); Assert.IsNull(results); }