private void NewLaunchHandler(Launch launch)
 {
     if (launch.LauncherId == LauncherId &&
         launchQueue.Contains(launch) == false &&
         (currentLaunch == null || currentLaunch.Equals(launch) == false))
     {
         launchQueue.Add(launch);
         DropNextPuck();
     }
 }
示例#2
0
        public void EqualstestIfTwoEqualsObjectAreAssumedToBeEqual()
        {
            Launch launchFirst  = new Launch();
            Launch launchSecond = new Launch();

            Assert.AreEqual(launchFirst, launchSecond);
            launchFirst.name            = "Test1";
            launchSecond.name           = "Test1";
            launchFirst.launchProvider  = "Bristol";
            launchSecond.launchProvider = "Bristol";
            launchFirst.rocketFullName  = "Test1";
            launchSecond.rocketFullName = "Test1";
            Assert.IsTrue(launchFirst.Equals(launchFirst));
            Assert.IsTrue(launchSecond.Equals(launchSecond));
            Assert.IsTrue(launchFirst.Equals(launchSecond));

            launchFirst.locationGoogleMapsUrl = "url";
            Assert.IsFalse(launchFirst.Equals(launchSecond));
            Assert.AreNotEqual(launchFirst, launchSecond);
        }