示例#1
0
        private LineupState CreateTwoNewLineupsScenario()
        {
            var fixtureClient = A.Fake <IFixtureClient>();
            var testFixture1  = TestBuilder.NoGoals(1);
            var testFixture2  = TestBuilder.NoGoals(2);

            A.CallTo(() => fixtureClient.GetFixturesByGameweek(1)).Returns(new List <Fixture>
            {
                testFixture1,
                testFixture2
            });

            var scraperFake = A.Fake <IGetMatchDetails>();

            A.CallTo(() => scraperFake.GetMatchDetails(testFixture1.PulseId)).Returns(TestBuilder.NoLineup(testFixture1.PulseId)).Once().Then.Returns(TestBuilder.Lineup(testFixture1.PulseId));;
            A.CallTo(() => scraperFake.GetMatchDetails(testFixture2.PulseId)).Returns(TestBuilder.NoLineup(testFixture2.PulseId)).Once().Then.Returns(TestBuilder.Lineup(testFixture2.PulseId));
            _mediator = A.Fake <IMediator>();
            return(new LineupState(fixtureClient, scraperFake, _mediator, A.Fake <ILogger <LineupState> >()));
        }