Наследование: ITeamMemberRepository
Пример #1
0
        static void RunSampleD()
        {
            var teamRockyId         = new TeamId(1);
            var teamRocky           = new SampleD.Team(teamRockyId);
            var teamMemberTheHulkId = new TeamMemberId(2);
            var teamMemberTheHulk   = new SampleD.TeamMember(teamRockyId, teamMemberTheHulkId, new DateTime(2010, 1, 1));
            var teamRepository      = new SampleD.TeamRepository(new Dictionary <TeamId, SampleD.Team> {
                { teamRockyId, teamRocky }
            });
            var teamMemberRepository = new SampleD.TeamMemberRepository(new Dictionary <TeamMemberId, SampleD.TeamMember> {
                { teamMemberTheHulkId, teamMemberTheHulk }
            });
            var teamChairmanshipRepository = new SampleD.TeamChairmanshipRepository(new List <SampleD.TeamChairmanship>());
            var makeChairmanService        = new SampleD.AppointChairmanService(teamRepository, teamMemberRepository, teamChairmanshipRepository);
            var service = new SampleD.TeamApplicationService(makeChairmanService);
            var request = new AppointChairmanRequest {
                TeamId = 1, TeamMemberId = 2
            };

            service.When(request);
        }
Пример #2
0
 static void RunSampleD()
 {
     var teamRockyId = new TeamId(1);
       var teamRocky = new SampleD.Team(teamRockyId);
       var teamMemberTheHulkId = new TeamMemberId(2);
       var teamMemberTheHulk = new SampleD.TeamMember(teamRockyId, teamMemberTheHulkId, new DateTime(2010, 1, 1));
       var teamRepository = new SampleD.TeamRepository(new Dictionary<TeamId, SampleD.Team> { { teamRockyId, teamRocky } });
       var teamMemberRepository = new SampleD.TeamMemberRepository(new Dictionary<TeamMemberId, SampleD.TeamMember> { { teamMemberTheHulkId, teamMemberTheHulk } });
       var teamChairmanshipRepository = new SampleD.TeamChairmanshipRepository(new List<SampleD.TeamChairmanship>());
       var makeChairmanService = new SampleD.AppointChairmanService(teamRepository, teamMemberRepository, teamChairmanshipRepository);
       var service = new SampleD.TeamApplicationService(makeChairmanService);
       var request = new AppointChairmanRequest { TeamId = 1, TeamMemberId = 2 };
       service.When(request);
 }