Ejemplo n.º 1
0
        public ScoreServiceTest()
        {
            var fixture = new AutoFixture.Fixture();

            player1 = fixture.Create <Player>();
            player2 = fixture.Create <Player>();
            player3 = fixture.Create <Player>();
            player4 = fixture.Create <Player>();

            card1 = fixture.Create <Card>();
            card2 = fixture.Create <Card>();
            card3 = fixture.Create <Card>();
            card4 = fixture.Create <Card>();

            card1.DrawnBy(player1);
            card2.DrawnBy(player2);
            card3.DrawnBy(player3);
            card4.DrawnBy(player4);
        }
Ejemplo n.º 2
0
 public StandingsCollectionTests()
 {
     _autoFixture = new AutoFixture.Fixture();
     _standings   = _autoFixture.CreateMany <Standing>();
     _result      = StandingsCollection.RetrieveFrom(this).Result;
 }
 public static void Register <TAbstract, TConcrete>(this Fixture fixture) where TConcrete : TAbstract
 {
     fixture.Register <TAbstract>(() => fixture.Create <TConcrete>());
 }