Beispiel #1
0
 static void RunSampleB2()
 {
     var teamRockyId = new TeamId(1);
       var teamRocky = new SampleB2.Team(teamRockyId);
       var teamMemberTheHulkId = new TeamMemberId(2);
       var teamMemberTheHulk = new SampleB2.TeamMember(teamRockyId, teamMemberTheHulkId, new DateTime(2010, 1, 1));
       var teamRepository = new SampleB2.TeamRepository(new Dictionary<TeamId, SampleB2.Team> { { teamRockyId, teamRocky } });
       var teamMemberRepository = new SampleB2.TeamMemberRepository(new Dictionary<TeamMemberId, SampleB2.TeamMember> { { teamMemberTheHulkId, teamMemberTheHulk } });
       var service = new SampleB2.TeamApplicationService(teamRepository, teamMemberRepository);
       var request = new AppointChairmanRequest { TeamId = 1, TeamMemberId = 2 };
       service.When(request);
 }
Beispiel #2
0
        static void RunSampleB2()
        {
            var teamRockyId         = new TeamId(1);
            var teamRocky           = new SampleB2.Team(teamRockyId);
            var teamMemberTheHulkId = new TeamMemberId(2);
            var teamMemberTheHulk   = new SampleB2.TeamMember(teamRockyId, teamMemberTheHulkId, new DateTime(2010, 1, 1));
            var teamRepository      = new SampleB2.TeamRepository(new Dictionary <TeamId, SampleB2.Team> {
                { teamRockyId, teamRocky }
            });
            var teamMemberRepository = new SampleB2.TeamMemberRepository(new Dictionary <TeamMemberId, SampleB2.TeamMember> {
                { teamMemberTheHulkId, teamMemberTheHulk }
            });
            var service = new SampleB2.TeamApplicationService(teamRepository, teamMemberRepository);
            var request = new AppointChairmanRequest {
                TeamId = 1, TeamMemberId = 2
            };

            service.When(request);
        }