Esempio n. 1
0
        static void RunSampleC()
        {
            var teamRockyId         = new TeamId(1);
            var teamRocky           = new SampleC.Team(teamRockyId);
            var teamMemberTheHulkId = new TeamMemberId(2);
            var teamMemberTheHulk   = new SampleC.TeamMember(teamRockyId, teamMemberTheHulkId, new DateTime(2010, 1, 1));
            var teamRepository      = new SampleC.TeamRepository(new Dictionary <TeamId, SampleC.Team> {
                { teamRockyId, teamRocky }
            });
            var teamMemberRepository = new SampleC.TeamMemberRepository(new Dictionary <TeamMemberId, SampleC.TeamMember> {
                { teamMemberTheHulkId, teamMemberTheHulk }
            });
            var makeChairmanService = new SampleC.AppointChairmanService(teamRepository, teamMemberRepository);
            var service             = new SampleC.TeamApplicationService(makeChairmanService);
            var request             = new AppointChairmanRequest {
                TeamId = 1, TeamMemberId = 2
            };

            service.When(request);
        }
Esempio n. 2
0
 static void RunSampleC()
 {
     var teamRockyId = new TeamId(1);
       var teamRocky = new SampleC.Team(teamRockyId);
       var teamMemberTheHulkId = new TeamMemberId(2);
       var teamMemberTheHulk = new SampleC.TeamMember(teamRockyId, teamMemberTheHulkId, new DateTime(2010, 1, 1));
       var teamRepository = new SampleC.TeamRepository(new Dictionary<TeamId, SampleC.Team> { { teamRockyId, teamRocky } });
       var teamMemberRepository = new SampleC.TeamMemberRepository(new Dictionary<TeamMemberId, SampleC.TeamMember> { { teamMemberTheHulkId, teamMemberTheHulk } });
       var makeChairmanService = new SampleC.AppointChairmanService(teamRepository, teamMemberRepository);
       var service = new SampleC.TeamApplicationService(makeChairmanService);
       var request = new AppointChairmanRequest { TeamId = 1, TeamMemberId = 2 };
       service.When(request);
 }