FitNesseRoot.Fitnesse.UserGuide.FixtureGallery.ImportantConcepts.FlowMode.content.txt Maven / Gradle / Ivy
''Previous page: [[!-Fixture Arguments-!][ listPlayers(){
return Player.players;
}
}
}}}
# section .NET Source Code
!3 !-.NET Source Code-!
{{{
using System;
using System.Collections.Generic;
using System.Text;
using fit;
namespace info.fitnesse.fixturegallery
{
public class DoFixtureFlowTest : fitlibrary.DoFixture
{
public Fixture PreparePlayers()
{
return new SetUpFixtureTest();
}
public List ListPlayers()
{
return Player.players;
}
}
}
}}}
# section Python Source Code
!3 !-Python Source Code-!
{{{
from fitLib.DoFixture import DoFixture
from fit.RowFixture import RowFixture
from info.fitnesse.fixturegallery.SetUpFixtureTest import SetUpFixtureTest
from info.fitnesse.fixturegallery.domain.Player import Player
import types
class DoFixtureFlowTest(DoFixture):
_typeDict = {}
_typeDict["preparePlayers.types"] = [ SetUpFixtureTest ]
def preparePlayers(self):
return SetUpFixtureTest()
_typeDict["listPlayers.types"] = [ "$Array" ] #< ACTUALLY: List of Players
def listPlayers(self):
# -- DESIRED: return Player.players
# But need to add type hints for list.scalarType .
return ( Player.players, Player._typeDict )
# ALTERNATIVES:
# return RowFixture(Player.players, Player._typeDict)
# return ArrayFixture(Player.players, Player._typeDict)
}}}
''Previous page: [[!-Fixture Arguments-!][