using System; using System.Linq; using Chernobyl.Config; using Chernobyl.Dependency; using NUnit.Framework; namespace Chernobyl.Reflection.Template.Xml { [TestFixture, Description("Tests the XmlMember class.")] public class XmlMemberTests : MemberTests { // TODO: // creates an instance that has a property // creates an instance that has a method // creates an instance that has a field // creates an instance that has an event public XmlMemberTests() { _core = new Core(); _core.Services.Inject(this); } protected override IMember CreateMemberWithArguments() { throw new NotImplementedException(); } protected override IMember CreateLinkedMember() { return FromFile("member/linked_property.fall").OfType().First(); } protected override IInstance CreateLinkedToInstance() { return FromFile("constructor/comma_seperated_constructor.fall"); } protected override object[] Arguments { get { throw new NotImplementedException(); } } /// /// A helper method that creates an from a file. /// /// The path to the file to load the /// from. /// The that was created from the file. IInstance FromFile(string filepath) { return XmlInstanceTests.FromFile(_core.Services, filepath); } [Inject] public ISearchPaths SearchPaths { set { value.Add("../../../Chernobyl.Test/Reflection/Template/data/instance"); } } Core _core; } }