i getting error message saying:
the member specified(setmodelfactory) not found. might need regenerate private accessor, or member may private , defined on base class. if latter true, need pass type defines member privateobject's constructor.
i try suggestion @ here, not work.
public void setmodelfactorytest() { availabilitybl target = new availabilitybl(); availabilityds ds = new availabilityds(); ds.enforceconstraints = false; testbusinesslogic.businesslogic_availabilityblaccessor accessor = new testbusinesslogic.businesslogic_availabilityblaccessor(target); // setup standard test data this.setuptestdata(ds, null); int newmodelid = 89; // add dummy model row this.setuptestmodel(newmodelid, ds); accessor.mavailabilityds = ds; int siteid = 22; int platformid = 33; string factoryname = "my cool factory"; datetime validuntil = new datetime(2015, 9, 27); accessor.setmodelfactory(siteid, platformid, factoryname, validuntil); assert.areequal(siteid, accessor.mavailabilityds.model[0].siteid, "setmodelfactory did not set siteid."); assert.areequal(platformid, accessor.mavailabilityds.model[0].platformid, "setmodelfactory did not set platformid."); assert.areequal(factoryname, accessor.mavailabilityds.model[0].factoryname, "setmodelfactory did not set factoryname."); assert.areequal(validuntil, accessor.mavailabilityds.model[0].validuntil, "setmodelfactory did not set validuntil."); }
vscodegenaccessors.cs
internal void setmodelfactory(int siteid, int platformid, string factoryname, global::system.datetime validuntil) { object[] args = new object[] { siteid, platformid, factoryname, validuntil}; m_privateobject.invoke("setmodelfactory", new system.type[] { typeof(int), typeof(int), typeof(string), typeof(global::system.datetime)}, args); }
Comments
Post a Comment