示例#1
0
        /// <exception cref="System.Exception"/>
        public virtual void TestSetName()
        {
            Configuration conf = new Configuration();

            WritableName.SetName(typeof(TestWritableName.SimpleWritable), testName);
            Type test = WritableName.GetClass(testName, conf);

            Assert.True(test.Equals(typeof(TestWritableName.SimpleWritable)
                                    ));
        }
示例#2
0
        /// <exception cref="System.Exception"/>
        public virtual void TestAddName()
        {
            Configuration conf    = new Configuration();
            string        altName = testName + ".alt";

            WritableName.SetName(typeof(TestWritableName.SimpleWritable), testName);
            WritableName.AddName(typeof(TestWritableName.SimpleWritable), altName);
            Type test = WritableName.GetClass(altName, conf);

            Assert.True(test.Equals(typeof(TestWritableName.SimpleWritable)
                                    ));
            // check original name still works
            test = WritableName.GetClass(testName, conf);
            Assert.True(test.Equals(typeof(TestWritableName.SimpleWritable)
                                    ));
        }