public void Adopt(string puppyName, string ownerName) { AdoptPuppyPresenter presenter = new AdoptPuppyPresenter( puppyName, ownerName, AppEnv.AdoptPuppy); presenter.Execute(); }
public void AdoptPuppyPresenter_triggers_execution_through_input_port() { var fakePort = new FakeAdoptPuppyRequest("IRRELEVANT"); AdoptPuppyPresenter cmd = new AdoptPuppyPresenter( "the puppy", "the owner", fakePort); cmd.Execute(); Assert.That(fakePort.observedPuppy, Is.EqualTo("the puppy")); Assert.That(fakePort.observedOwner, Is.EqualTo("the owner")); }
public void AdoptPuppyPresenter_displays_adoption_confirmation() { AdoptPuppyPresenter cmd = new AdoptPuppyPresenter( "Spike", "Tom", new FakeAdoptPuppyRequest("IRRELEVANT")); cmd.Execute(); Assert.That(_consoleOut.ToString(), Is.StringContaining("Spike was adopted by: Tom")); }
public void AdoptPuppyPresenter_displays_use_case_heading() { AdoptPuppyPresenter cmd = new AdoptPuppyPresenter( "IRRELEVANT", "IRRELEVANT", new FakeAdoptPuppyRequest("ADOPT PUPPY HEADING")); cmd.Execute(); Assert.That(_consoleOut.ToString(), Is.StringContaining("ADOPT PUPPY HEADING")); }