public void testSubjectAreaSIF15r1() { Adk.SifVersion = SifVersion.SIF15r1; SchoolCourseInfo sci = new SchoolCourseInfo(); SubjectAreaList lst = new SubjectAreaList(); sci.SubjectAreaList = lst; SubjectArea sa = new SubjectArea( "13" ); sa.TextValue = "Graphic Arts"; // for SIF 1.x ??? OtherCodeList ocl = new OtherCodeList(); ocl.Add( new OtherCode( Codeset.TEXT, "Graphic Arts" ) ); sa.OtherCodeList = ocl; lst.Add( sa ); StringWriter sw = new StringWriter(); SifWriter sifw = new SifWriter( sw ); sifw.Write( sci ); sifw.Flush(); sifw.Close(); String xml = sw.ToString(); Console.WriteLine( xml ); int found = xml.IndexOf( ">Graphic Arts</SubjectArea>" ); Assertion.Assert( found > -1 ); }
public void testSubjectAreaSIF15r1() { Adk.SifVersion = SifVersion.SIF15r1; SchoolCourseInfo sci = new SchoolCourseInfo(); SubjectAreaList lst = new SubjectAreaList(); sci.SubjectAreaList = lst; SubjectArea sa = new SubjectArea("13"); sa.TextValue = "Graphic Arts"; // for SIF 1.x ??? OtherCodeList ocl = new OtherCodeList(); ocl.Add(new OtherCode(Codeset.TEXT, "Graphic Arts")); sa.OtherCodeList = ocl; lst.Add(sa); StringWriter sw = new StringWriter(); SifWriter sifw = new SifWriter(sw); sifw.Write(sci); sifw.Flush(); sifw.Close(); String xml = sw.ToString(); Console.WriteLine(xml); int found = xml.IndexOf(">Graphic Arts</SubjectArea>"); Assertion.Assert(found > -1); }