public void ShouldNotBePossibleToAddNULL() { //Given StoryRunner storyRunner = new StoryRunner(null); //When storyRunner.AddStory <object>(null); }
public void ShouldNotBePossibleToAddNULL() { //Given StoryRunner storyRunner = new StoryRunner(null); //When storyRunner.AddStory<object>(null); }
public void SHouldNotBePossibleToAddStringAsStory() { //Given StoryRunner storyRunner = new StoryRunner(Assembly.GetAssembly(this.GetType())); string story = "Ths is not a story"; //When storyRunner.AddStory(story); //Then // we get an exception }
void Start() { StoryContext context = new StoryContext(); context.StoryEntry = this; StoryRunner runner = new StoryRunner(); context.StoryPlayer = runner; installer.Install(context); context.Resolve(); runner.Run(installer.GetScenarioName()); }
public void SHouldNotBePossibleToAddStringAsStory() { //Given StoryRunner storyRunner = new StoryRunner(Assembly.GetAssembly(this.GetType())); string story = "Ths is not a story"; //When storyRunner.AddStory(story); //Then // we get an exception }
public void ShouldRunStory() { //Given FakeStory story = new FakeStory(); StoryRunner storyRunner = new StoryRunner(); storyRunner.AddStory(story); //When storyRunner.Run(); //Then Assert.IsTrue(story.didCallRun); }
public void ShouldRunStory() { //Given FakeStory story = new FakeStory(); StoryRunner storyRunner = new StoryRunner(); storyRunner.AddStory(story); //When storyRunner.Run(); //Then Assert.IsTrue(story.didCallRun); }
public void ShouldFindStoryInAssembly() { // Since I'm lazy, I will use Examlpes.CS //Given System.Reflection.Assembly asm = this.GetType().Assembly; StoryRunner storyRunner = new StoryRunner(asm); bool storyCalled = false; storyRunner.ExecutingStory += delegate(Object sender, StoryEventArgs e) { storyCalled = true; }; //When storyRunner.Run(); //Then - Check on how many stories that where executed instead, via the events. Assert.IsTrue(storyCalled); }
public void ShouldFindStoryInAssembly() { // Since I'm lazy, I will use Examlpes.CS //Given System.Reflection.Assembly asm = this.GetType().Assembly; StoryRunner storyRunner = new StoryRunner(asm); bool storyCalled = false; storyRunner.ExecutingStory += delegate(Object sender, StoryEventArgs e) { storyCalled = true; }; //When storyRunner.Run(); //Then - Check on how many stories that where executed instead, via the events. Assert.IsTrue(storyCalled); }
void Start() { _runner = GetComponent <StoryRunner>(); }