コード例 #1
0
        public void PositionshouldNotchange()
        {
            TrackingMissileLauncher launcher = new TrackingMissileLauncher();

            launcher.HorizAxisPos = 0;
            launcher.Stop();
            launcher.Fire();
            Assert.AreEqual(0, launcher.HorizAxisPos);
        }
コード例 #2
0
 public void ShouldReach36Degrees()
 {
     TrackingMissileLauncher launcher = new TrackingMissileLauncher();
     launcher.VertAxisPos = 45;
     launcher.Down();
     System.Threading.Thread.Sleep(1000);
     launcher.Stop();
     Assert.AreEqual(36, launcher.VertAxisPos);
 }
コード例 #3
0
        public void PositionshouldNotchange()
        {
            TrackingMissileLauncher launcher = new TrackingMissileLauncher();

            launcher.HorizAxisPos = 0;
            launcher.Left();

            System.Threading.Thread.Sleep(1000);

            launcher.Fire();
            Assert.AreEqual(20, launcher.HorizAxisPos);

            System.Threading.Thread.Sleep(1000);
            Assert.AreEqual(20, launcher.HorizAxisPos);
        }
コード例 #4
0
 public void ShouldReach20Degrees()
 {
     var launcher = new TrackingMissileLauncher();
     launcher.HorizAxisPos = 0;
     launcher.Left();
     System.Threading.Thread.Sleep(1000);
     Assert.AreEqual(20, launcher.HorizAxisPos);
 }
コード例 #5
0
 public void ShouldReach45Degrees()
 {
     TrackingMissileLauncher launcher = new TrackingMissileLauncher();
     launcher.VertAxisPos = 0;
     launcher.Up();
     System.Threading.Thread.Sleep(5000);
     launcher.Stop();
     Assert.AreEqual(45, launcher.VertAxisPos);
 }
コード例 #6
0
 public void ShouldReach0Degrees()
 {
     var launcher = new TrackingMissileLauncher();
     launcher.HorizAxisPos = 180;
     launcher.Right();
     System.Threading.Thread.Sleep(9000);
     Assert.AreEqual(0, launcher.HorizAxisPos);
 }
コード例 #7
0
        public void ShouldStop()
        {
            TrackingMissileLauncher launcher = new TrackingMissileLauncher();
            launcher.VertAxisPos = 40;
            launcher.Up();
            System.Threading.Thread.Sleep(3000);

            Assert.AreEqual(45, launcher.VertAxisPos);
        }
コード例 #8
0
        public void ShouldStop()
        {
            TrackingMissileLauncher launcher = new TrackingMissileLauncher();
            launcher.HorizAxisPos = 160;
            launcher.Left();
            System.Threading.Thread.Sleep(3000);

            Assert.AreEqual(180, launcher.HorizAxisPos);
        }