c# - Dealing with TargetWithLayout in XUNIT -
i have class,
public class createloggingrulefactory : iloggingrulefactory { public loggingrule createdefaultloggingrule(string rulename , loglevel minimumlevel, loglevel maximumlevelname,targetwithlayout targetwithoutstacktrace) { // blah blah var defaultloggerrule = new loggingrule(rulename, minimumlevel targetwithoutstacktrace); return defaultloggerrule; }
targetwithlayout
nlog api.
i want make integration test it. have uncompleted code
public class createloggingrulefactorintegrationtests { [theory] [inlinedata(new object[] {"consoleloggerfactory.myconsolelogger", loglevel.trace,loglevel.debug,classdata(typeof(targetwithlayout)})] public void createloggingrulefactory_createdefaultlogger_should_create_loggingrule_class() { // arrange var createloggingrulefactory = new createloggingrulefactory(); var defaultloggerrule = createloggingrulefactory.createdefaultloggingrule (); assert.equal(typeof(loggingrule), defaultloggerrule.gettype()); }
my question don't know how pass object targetwithlayout
test method.
eventually figure out. need pass instance of targetwithlayout
argument method.
Comments
Post a Comment