コード例 #1
0
        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 );
        }
コード例 #2
0
        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);
        }