public void GetPartAddInfoTest() { int artID = 638819; int badArtID = -1; using( var ctx = new TecdocBaseDataContext() ) { ctx.Log = new DebuggerWriter(); XmlDocument xml1 = new XmlDocument(); XmlDocument xml2 = new XmlDocument(); var val1 = ctx.GetPartAddInfo( artID ); var val2 = ctx.GetPartAddInfo( badArtID ); Assert.IsTrue( val1.Count() >= val2.Count() ); Assert.IsTrue( val2.Count() == 0); } }
public static IEnumerable<KeyValuePair<string, string>> GetPartAddInfo( int artId ) { using( var ctx = new RmsAuto.TechDoc.Entities.TecdocBase.TecdocBaseDataContext() ) { return ctx.GetPartAddInfo( artId ); } }