public void TestWiring() { try { AssertContextLoading(); Assert.Fail(); } catch (System.Exception e) { DefaultContextLocationBuilder contextBuilder = new DefaultContextLocationBuilder(); Assert.True(e.ToString().Contains("Unable to load " + contextBuilder.build(this.GetType()) )); } }
public void TestWiring() { try { AssertContextLoading(); Assert.Fail(); } catch (System.Exception e) { DefaultContextLocationBuilder contextBuilder = new DefaultContextLocationBuilder(); Assert.True(e.ToString().Contains("Unable to load " + contextBuilder.build(this.GetType()) )); //preserve error trace where the inner exception states the xml file is not well formed Assert.True(e.InnerException is ObjectDefinitionStoreException); Assert.True(e.InnerException.ToString().Contains("Line 28 in XML document from assembly ") ); } }
public void TestBuild() { DefaultContextLocationBuilder builder = new DefaultContextLocationBuilder(); Assert.AreEqual("assembly://mscorlib/System/String-BeanohContext.xml", builder.build(typeof(string))); }