| 
									
										
										
										
											2024-09-19 10:21:07 +08:00
										 |  |  | package script | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | import ( | 
					
						
							|  |  |  | 	"fmt" | 
					
						
							|  |  |  | 	"testing" | 
					
						
							|  |  |  | ) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | func TestOpenGame(t *testing.T) { | 
					
						
							|  |  |  | 	client, err := NewClient() | 
					
						
							|  |  |  | 	if err != nil { | 
					
						
							|  |  |  | 		panic(err) | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | 	req := CreateOpenGameReq(7275) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	resp, err := client.OpenGame(req) | 
					
						
							|  |  |  | 	if err != nil { | 
					
						
							|  |  |  | 		panic(err) | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	fmt.Println(resp.Code, resp.Msg) | 
					
						
							|  |  |  | } | 
					
						
							| 
									
										
										
										
											2025-06-27 17:52:00 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | func TestNewPayRedisData(t *testing.T) { | 
					
						
							|  |  |  | 	client, err := NewClient() | 
					
						
							|  |  |  | 	if err != nil { | 
					
						
							|  |  |  | 		panic(err) | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | 	req := CreateNewPayRedisDataReq() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	resp, err := client.NewPayRedisData(req) | 
					
						
							|  |  |  | 	if err != nil { | 
					
						
							|  |  |  | 		panic(err) | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	fmt.Println(resp.Code, resp.Msg) | 
					
						
							|  |  |  | } |