widget_test.dart 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. // This is a basic Flutter widget test.
  2. //
  3. // To perform an interaction with a widget in your test, use the WidgetTester
  4. // utility in the flutter_test package. For example, you can send tap and scroll
  5. // gestures. You can also use WidgetTester to find child widgets in the widget
  6. // tree, read text, and verify that the values of widget properties are correct.
  7. import 'package:fis_jsonrpc/rpc.dart';
  8. import 'package:flutter_test/flutter_test.dart';
  9. import 'package:vitalapp/architecture/utils/sensitive.dart';
  10. void main() {
  11. testWidgets('Counter increments smoke test', (WidgetTester tester) async {
  12. // Build our app and trigger a frame.
  13. });
  14. test("Sensitive", () {
  15. print(SensitiveUtils.desensitizeChineseName("管欣溢"));
  16. print(SensitiveUtils.desensitizeIdCard("320506200010102222"));
  17. print(SensitiveUtils.desensitizeAddress("江苏省苏州市吴中区长桥街道迎春路2号"));
  18. print(SensitiveUtils.desensitizeAddress("江苏省苏州市常熟市虞山镇珠江路2号"));
  19. });
  20. test("PatientDtoConvert", () {
  21. final createReq = CreatePatientRequest();
  22. final createReqJson = createReq.toJson();
  23. print("createReqJson!");
  24. print(createReqJson);
  25. // final patientDto = PatientDTO.fromJson(createReqJson);
  26. final patientDto = PatientDTO();
  27. final patientDtoJson = patientDto.toJson();
  28. print("patientDtoJson!");
  29. print(patientDtoJson);
  30. final reCreateReq = CreatePatientRequest.fromJson(patientDtoJson);
  31. final reCreateReqJson = reCreateReq.toJson();
  32. print("reCreateReqJson!");
  33. print(reCreateReqJson);
  34. final updateReq = UpdatePatientRequest.fromJson(patientDtoJson);
  35. final updateReqJson = updateReq.toJson();
  36. print("updateReqJson!");
  37. print(updateReqJson);
  38. });
  39. test("PatientExtDtoConvert", () {
  40. final createReq = CreatePatientExtensionRequest();
  41. final createReqJson = createReq.toJson();
  42. print("createReqJson!");
  43. print(createReqJson);
  44. // final patientDto = PatientDTO.fromJson(createReqJson);
  45. final patientDto = PatientDTO();
  46. final patientDtoJson = patientDto.toJson();
  47. print("patientDtoJson!");
  48. print(patientDtoJson);
  49. final reCreateReq = CreatePatientExtensionRequest.fromJson(patientDtoJson);
  50. final reCreateReqJson = reCreateReq.toJson();
  51. print("reCreateReqJson!");
  52. print(reCreateReqJson);
  53. final updateReq = CreatePatientRequest.fromJson(patientDtoJson);
  54. final updateReqJson = updateReq.toJson();
  55. print("updateReqJson!");
  56. print(updateReqJson);
  57. });
  58. }