예제 #1
0
        public void writeGeneric()
        {
            string    path = tmpFile("write.generic");
            SkillFile sf   = SkillFile.open(path);

            reflectiveInit(sf);
            sf.close();
            File.Delete(path);
        }
예제 #2
0
        public void APITest_core_constants_acc_make()
        {
            string    path = tmpFile("make");
            SkillFile sf   = SkillFile.open(path, Mode.Create, Mode.Write);

            // create objects
            constants.Constant consts = (constants.Constant)sf.Constants().make();
            // set fields
            sf.close();

            { // read back and assert correctness
                SkillFile sf2 = SkillFile.open(sf.currentPath(), Mode.Read, Mode.ReadOnly);
                // check count per Type
                Assert.AreEqual(1, sf.Constants().staticSize());
                // create objects from file
                constants.Constant consts_2 = (constants.Constant)sf2.Constants().getByID(consts.SkillID);
                // assert fields
            }
            File.Delete(path);
        }