public void CantEngagePlayerNotForMyClub() { var userService = new UsersService.Api(); var juventusClubId = 1; var someOtherClub = 2; userService.RegisterUser(new RegisterUserRequest { ClubId = juventusClubId, Password = "******", UserName = "******" }); var api = new PublicApi.Api(userService); api.LogIn(new LogInRequest { UserName = "******", Password = "******" }); Should.Throw <Exception>(() => api .EngagePlayerWithoutTransferAgreement(new EngageWithoutTransferAgreementRequest { EngagingClubId = someOtherClub, PaymentsAmount = 0, PlayerId = 1, ReleasingClubId = juventusClubId, })); }
public void CanReleasePlayerFromMyOwnClub() { var userService = new UsersService.Api(); var juventusClubId = 1; var someOtherClub = 2; userService.RegisterUser(new RegisterUserRequest { ClubId = 1, Password = "******", UserName = "******" }); var api = new PublicApi.Api(userService); api.LogIn(new LogInRequest { UserName = "******", Password = "******" }); api.ReleasePlayer(new ReleasePlayerRequest { EngagingClubId = someOtherClub, PaymentsAmount = 0, PlayerId = 1, ReleasingClubId = juventusClubId, }); }