コード例 #1
0
ファイル: AssemblyLoadTest.cs プロジェクト: Chainie/robocode
 public void testType()
 {
     var shell = new AppDomainShell();
     shell.Init(false);
     shell.Open(typeof(ThreadAttack).Assembly.Location);
     RobotType type = shell.GetRobotType(typeof(ThreadAttack).FullName);
     Assert.AreEqual(RobotType.ADVANCED, type);
     shell.Open(typeof(MyFirstRobot).Assembly.Location);
     type = shell.GetRobotType(typeof(MyFirstRobot).FullName);
     Assert.AreEqual(RobotType.STANDARD, type);
     shell.Dispose();
 }
コード例 #2
0
 public void testType()
 {
     var shell = new AppDomainShell();
     shell.Init(false);
     shell.Open(typeof(ThreadAttack).Assembly.Location);
     RobotType robotType = shell.GetRobotType(typeof(ThreadAttack).FullName);
     Assert.IsTrue(robotType.isAdvancedRobot());
     shell.Open(typeof(MyFirstRobot).Assembly.Location);
     robotType = shell.GetRobotType(typeof(MyFirstRobot).FullName);
     Assert.IsTrue(robotType.isStandardRobot());
     shell.Dispose();
 }