public void GetNextSystem_Communicates_NextSystem()
        {
            TestCommunicator     communicator = CreateCommunicator();
            Navigator            navigator    = CreateNavigator();
            GetNextSystemPhrases phrases      = new GetNextSystemPhrases {
                Phrases = new[] { "{0}" }
            };
            GetNextSystemCommand sut = new GetNextSystemCommand(communicator, navigator, phrases);

            TestEvent testEvent = Build.An.Event.WithEvent(sut.SupportedCommand);

            Celestial  celestial = Build.A.Celestial.ThatHasNotBeenScanned();
            StarSystem system    = Build.A.StarSystem.WithCelestial(celestial);

            navigator.PlanExpedition(new[] { system });

            sut.Handle(testEvent);

            communicator.MessagesCommunicated.Single().Should().Be(system.Name);
        }
Exemplo n.º 2
0
 public GetNextSystemCommand(ICommunicator communicator, INavigator navigator, GetNextSystemPhrases phrases)
 {
     _communicator = communicator;
     _navigator    = navigator;
     _phraseBook   = PhraseBook.Ingest(phrases.Phrases);
 }