public async Task DoWhile_FalseCondition() { var xml = @"<storyboard> <tutorial>texto1</tutorial> <do while=""a=1""> <narration>texto2</narration> </do> <tutorial>texto3</tutorial> </storyboard>"; var tester = await StoryboardEventTester.CreateAsync(xml); await tester.ForwardAsync("tutorial start", "tutorial: texto1"); await tester.ForwardAsync("tutorial end", "tutorial start", "tutorial: texto3"); await tester.ForwardEndAsync("tutorial end"); await tester.BackwardAsync("tutorial start", "tutorial: texto3"); await tester.BackwardAsync("tutorial end", "tutorial start", "tutorial: texto1"); await tester.BackwardEndAsync("tutorial end"); }
public async Task SimpleTalk() { var xml = @"<storyboard> <protagonist>jane</protagonist> <person>jane</person> <speech>texto1</speech> <person>clara</person> <speech>texto2</speech> <speech>texto3</speech> <person>jane</person> <thought>texto4</thought> <thought>texto5</thought> <person>clara</person> <thought>texto6</thought> </storyboard>"; var tester = await StoryboardEventTester.CreateAsync(xml); await tester.ForwardAsync("protagonist: jane", "person* enter: jane", "speech* start", "speech*: texto1"); await tester.ForwardAsync("speech* end", "person* leave: jane", "person enter: clara", "speech start", "speech: texto2"); await tester.ForwardAsync("speech: texto3"); await tester.ForwardAsync("speech end", "person leave: clara", "person* enter: jane", "thought* start", "thought*: texto4"); await tester.ForwardAsync("thought*: texto5"); await tester.ForwardAsync("thought* end", "person* leave: jane", "person enter: clara", "thought start", "thought: texto6"); await tester.ForwardEndAsync("thought end", "person leave: clara", "protagonist undefined"); await tester.BackwardAsync("protagonist: jane", "person enter: clara", "thought start", "thought: texto6"); await tester.BackwardAsync("thought end", "person leave: clara", "person* enter: jane", "thought* start", "thought*: texto5"); await tester.BackwardAsync("thought*: texto4"); await tester.BackwardAsync("thought* end", "person* leave: jane", "person enter: clara", "speech start", "speech: texto3"); await tester.BackwardAsync("speech: texto2"); await tester.BackwardAsync("speech end", "person leave: clara", "person* enter: jane", "speech* start", "speech*: texto1"); await tester.BackwardEndAsync("speech* end", "person* leave: jane", "protagonist undefined"); }
public async Task DoWhile_Concatenated() { var xml = @"<storyboard> <tutorial>texto1</tutorial> <do while=""a!=2""> <narration>texto2</narration> <set>a++</set> <do while=""b!=2""> <narration>texto3</narration> <set>b++</set> </do> </do> <tutorial>texto4</tutorial> </storyboard>"; var tester = await StoryboardEventTester.CreateAsync(xml); await tester.ForwardAsync("tutorial start", "tutorial: texto1"); await tester.ForwardAsync("tutorial end", "narration start", "narration: texto2"); await tester.ForwardAsync("narration end", "narration start", "narration: texto3"); await tester.ForwardAsync("narration end", "narration start", "narration: texto3"); await tester.ForwardAsync("narration end", "narration start", "narration: texto2"); await tester.ForwardAsync("narration end", "tutorial start", "tutorial: texto4"); await tester.ForwardEndAsync("tutorial end"); await tester.BackwardAsync("tutorial start", "tutorial: texto4"); await tester.BackwardAsync("tutorial end", "narration start", "narration: texto2"); await tester.BackwardAsync("narration end", "narration start", "narration: texto3"); await tester.BackwardAsync("narration end", "narration start", "narration: texto3"); await tester.BackwardAsync("narration end", "narration start", "narration: texto2"); await tester.BackwardAsync("narration end", "tutorial start", "tutorial: texto1"); await tester.BackwardEndAsync("tutorial end"); }
public async Task InterlocutorSpeechAndThought() { var xml = @"<storyboard> <person>clodoaldo</person> <speech>texto1</speech> <speech>texto2</speech> <thought>texto3</thought> <speech>texto4</speech> <thought>texto5</thought> <thought>texto6</thought> </storyboard>"; var tester = await StoryboardEventTester.CreateAsync(xml); await tester.ForwardAsync("person enter: clodoaldo", "speech start", "speech: texto1"); await tester.ForwardAsync("speech: texto2"); await tester.ForwardAsync("speech end", "thought start", "thought: texto3"); await tester.ForwardAsync("thought end", "speech start", "speech: texto4"); await tester.ForwardAsync("speech end", "thought start", "thought: texto5"); await tester.ForwardAsync("thought: texto6"); await tester.ForwardEndAsync("thought end", "person leave: clodoaldo"); await tester.BackwardAsync("person enter: clodoaldo", "thought start", "thought: texto6"); await tester.BackwardAsync("thought: texto5"); await tester.BackwardAsync("thought end", "speech start", "speech: texto4"); await tester.BackwardAsync("speech end", "thought start", "thought: texto3"); await tester.BackwardAsync("thought end", "speech start", "speech: texto2"); await tester.BackwardAsync("speech: texto1"); await tester.BackwardEndAsync("speech end", "person leave: clodoaldo"); }
public async Task TutorialAndNarration() { var xml = @"<storyboard> <tutorial>texto1</tutorial> <tutorial>texto2</tutorial> <narration>texto3</narration> <narration>texto4</narration> <tutorial>texto5</tutorial> <narration>texto6</narration> </storyboard>"; var tester = await StoryboardEventTester.CreateAsync(xml); await tester.ForwardAsync("tutorial start", "tutorial: texto1"); await tester.ForwardAsync("tutorial: texto2"); await tester.ForwardAsync("tutorial end", "narration start", "narration: texto3"); await tester.ForwardAsync("narration: texto4"); await tester.ForwardAsync("narration end", "tutorial start", "tutorial: texto5"); await tester.ForwardAsync("tutorial end", "narration start", "narration: texto6"); await tester.ForwardEndAsync("narration end"); await tester.BackwardAsync("narration start", "narration: texto6"); await tester.BackwardAsync("narration end", "tutorial start", "tutorial: texto5"); await tester.BackwardAsync("tutorial end", "narration start", "narration: texto4"); await tester.BackwardAsync("narration: texto3"); await tester.BackwardAsync("narration end", "tutorial start", "tutorial: texto2"); await tester.BackwardAsync("tutorial: texto1"); await tester.BackwardEndAsync("tutorial end"); }
public async Task ProtagonistMood() { var xml = @"<storyboard> <protagonist>jane</protagonist> <person>jane</person> <speech>texto1</speech> <mood>surprised</mood> <speech>texto2</speech> <speech>texto3</speech> <mood>angry</mood> <thought>texto5</thought> </storyboard>"; var tester = await StoryboardEventTester.CreateAsync(xml); await TestMood(tester); await TestMood(tester); await TestMood(tester);
static async Task TestMood(StoryboardEventTester tester) { await tester.ForwardAsync("protagonist: jane", "person* enter: jane", "speech* start", "speech*: texto1"); await tester.ForwardAsync("mood* surprised: jane", "speech*: texto2"); await tester.ForwardAsync("speech*: texto3"); await tester.ForwardAsync("speech* end", "mood* angry: jane", "thought* start", "thought*: texto5"); await tester.ForwardEndAsync("thought* end", "person* leave: jane", "protagonist undefined"); await tester.BackwardAsync("protagonist: jane", "person* enter: jane", "mood* angry: jane", "thought* start", "thought*: texto5"); await tester.BackwardAsync("thought* end", "mood* surprised: jane", "speech* start", "speech*: texto3"); await tester.BackwardAsync("speech*: texto2"); await tester.BackwardAsync("mood* normal: jane", "speech*: texto1"); await tester.BackwardEndAsync("speech* end", "person* leave: jane", "protagonist undefined"); }
public async Task FowardAndBackward() { var xml = @"<storyboard> <background> <right>fundo1</right> <scroll /> <pause /> <color>black</color> <pause>250</pause> <color>white</color> </background> <pause /> <background>fundo2</background> <pause /> </storyboard>"; var tester = await StoryboardEventTester.CreateAsync(xml); for (var n = 0; n <= 3; n++) { await tester.ForwardAsync("bg right: fundo1", "bg scroll"); await tester.ForwardAsync("bg color: black", "pause: 250", "bg color: white"); await tester.ForwardAsync("bg left: fundo2", "bg scroll"); await tester.ForwardEndAsync("bg empty"); await tester.BackwardAsync("bg right: fundo2"); await tester.BackwardAsync("bg scroll", "bg color: white"); await tester.BackwardAsync("bg color: black", "bg left: fundo1"); await tester.BackwardEndAsync("bg scroll", "bg empty"); } }
public async Task Music() { var xml = @"<storyboard> <music>open_sky</music> <pause /> <music>never_look_back</music> <pause /> </storyboard>"; var tester = await StoryboardEventTester.CreateAsync(xml); await tester.ForwardAsync("music: open_sky"); await tester.ForwardAsync("music: never_look_back"); await tester.ForwardEndAsync("music undefined"); await tester.BackwardAsync("music: never_look_back"); await tester.BackwardAsync("music: open_sky"); await tester.BackwardEndAsync("music undefined"); }