
Resources.FitNesseRoot.FitNesse.UserGuide.FixtureGallery.BasicFitFixtures.RowFixture.content.txt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fitnesse Show documentation
Show all versions of fitnesse Show documentation
The fully integrated standalone wiki, and acceptance testing framework.
''Previous page: [[!-ActionFixture-!][ -!!- -!'''!- getTargetClass -!'''!- — returns the -!'''!- Type -!'''!- or -!'''!- Class -!'''!- object representing the type of objects contained in the array. -!!- -!!- -!'''!- query -!'''!- — returns the actual array of objects to be verified.-!!- -!!- -!# section Java Source Code
!3 !-Java Source Code-!
{{{
package info.fitnesse.fixturegallery;
import info.fitnesse.fixturegallery.domain.Player;
import fit.RowFixture;
public class RowFixtureTest extends RowFixture{
public Class getTargetClass() {
return Player.class;
}
public Object[] query() throws Exception {
return Player.players.toArray();
}
}
}}}
# section .NET Source Code
!3 !-.NET Source Code-!
{{{
using System;
using System.Collections.Generic;
using System.Text;
namespace info.fitnesse.fixturegallery
{
public class RowFixtureTest: fit.RowFixture
{
public override Type GetTargetClass()
{
return typeof(Player);
}
public override object[] Query()
{
return Player.players.ToArray();
}
}
}
}}}
# section Python Source Code
!3 !-Python Source Code-!
{{{
from fit.RowFixture import RowFixture
from info.fitnesse.fixturegallery.domain.Player import Player
class RowFixtureTest(RowFixture):
def getTargetClass(self):
return Player
def query(self):
return list(Player.players) #< Return copy of players
}}}
# section Notes
!3 !-Notes-!
!-If the object has some properties that can be considered part of the identity (such as a primary key), list those properties to the left, before auxiliary properties. This will make error reports easier to read. Consider the -![[!-Figure 1-!][
© 2015 - 2025 Weber Informatics LLC | Privacy Policy