public void ShouldAddGivenToScenario() { //Given Mockery mocks = new Mockery(); IGiven aGiven = (IGiven)mocks.NewMock<IGiven>(); List<IGiven> GivenCollection = new List<IGiven>(); IScenario scenario = new MyScenario(GivenCollection, null, null,null); //When scenario.Given("a given", aGiven); //Then Assert.AreEqual(1, GivenCollection.Count); }
public void ShouldAddEventToScenario() { //Given Mockery mocks = new Mockery(); IGiven aGiven = (IGiven)mocks.NewMock<IGiven>(); IEvent evt = mocks.NewMock<IEvent>(); Scenario.Scenario scenario = new MyScenario(); //When scenario.Given("a given", aGiven).When("an event", evt); //Then Assert.IsNotNull (scenario.Event); }
public void ShouldAddGivenToScenario() { //Given Mockery mocks = new Mockery(); IGiven aGiven = (IGiven)mocks.NewMock <IGiven>(); List <IGiven> GivenCollection = new List <IGiven>(); IScenario scenario = new MyScenario(GivenCollection, null, null, null); //When scenario.Given("a given", aGiven); //Then Assert.AreEqual(1, GivenCollection.Count); }
public void ShouldAddEventToScenario() { //Given Mockery mocks = new Mockery(); IGiven aGiven = (IGiven)mocks.NewMock <IGiven>(); IEvent evt = mocks.NewMock <IEvent>(); Scenario.Scenario scenario = new MyScenario(); //When scenario.Given("a given", aGiven).When("an event", evt); //Then Assert.IsNotNull(scenario.Event); }
public void ShouldAddOutcome() { //Given Mockery mocks = new Mockery(); IGiven aGiven = (IGiven)mocks.NewMock <IGiven>(); IEvent evt = mocks.NewMock <IEvent>(); IWorldOutcome outcome = mocks.NewMock <IWorldOutcome>(); List <IGiven> givenCollection = new List <IGiven>(); List <IWorldOutcome> outcomeCollection = new List <IWorldOutcome>(); IScenario scenario = new MyScenario(givenCollection, null, outcomeCollection, null); //When scenario.Given("a given", aGiven).When("an event", evt).Then("an outcome", outcome); //Then Assert.AreEqual(1, outcomeCollection.Count); }
public void ShouldAddMultipleGivensToScenario() { //Given Mockery mocks = new Mockery(); IGiven aGiven = (IGiven)mocks.NewMock<IGiven>(); IGiven anotherGiven = (IGiven)mocks.NewMock<IGiven>(); IGiven yetAnotherGiven = (IGiven)mocks.NewMock<IGiven>(); List<IGiven> GivenCollection = new List<IGiven>(); IScenario scenario = new MyScenario(GivenCollection, null, null, null); //When scenario. Given("a given", aGiven). And("a given", anotherGiven). And("a given", yetAnotherGiven); //Then Assert.AreEqual(3, GivenCollection.Count); }
public void ShouldAddMultipleGivensToScenario() { //Given Mockery mocks = new Mockery(); IGiven aGiven = (IGiven)mocks.NewMock <IGiven>(); IGiven anotherGiven = (IGiven)mocks.NewMock <IGiven>(); IGiven yetAnotherGiven = (IGiven)mocks.NewMock <IGiven>(); List <IGiven> GivenCollection = new List <IGiven>(); IScenario scenario = new MyScenario(GivenCollection, null, null, null); //When scenario. Given("a given", aGiven). And("a given", anotherGiven). And("a given", yetAnotherGiven); //Then Assert.AreEqual(3, GivenCollection.Count); }
public void ShouldAddOutcome() { //Given Mockery mocks = new Mockery(); IGiven aGiven = (IGiven)mocks.NewMock<IGiven>(); IEvent evt = mocks.NewMock<IEvent>(); IWorldOutcome outcome = mocks.NewMock<IWorldOutcome>(); List<IGiven> givenCollection = new List<IGiven>(); List<IWorldOutcome> outcomeCollection = new List<IWorldOutcome>(); IScenario scenario = new MyScenario(givenCollection, null, outcomeCollection, null); //When scenario.Given("a given", aGiven).When("an event", evt).Then("an outcome", outcome); //Then Assert.AreEqual(1, outcomeCollection.Count); }