基于 SOC 职业分类
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/FDU-INS/Insurance-Skills --skill insurance-testing命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
Complete architecture reference for the A3 insurance platform — file locations, data flow, conventions, microservice map, and fullstack patterns
Drafts U.S. commercial real estate access and indemnity (right-of-entry) agreements for pre-closing due diligence. Covers license grants, non-invasive vs invasive testing gates, insurance/endorsement requirements, indemnity with discovery carve-outs, restoration and lien remedies, confidentiality, and anti-indemnity guardrails. Trigger: access agreement, right of entry, due diligence access, Phase I/II, invasive testing, pre-PSA site inspection.
Guide actuarial analysis for insurance pricing. TRIGGERS - Use when user needs help with actuarial-analysis related tasks.
| name | insurance-testing |
| description | Detailed testing standards for persistence, service, and controller layers |
Use this skill when creating or modifying tests in this project.
@WebMvcTest + MockMvc.@SpringBootTest or @DataJpaTest with in-memory DB.Applies to repository/integration-style tests.
@Transactional + @Rollback) to avoid side effects.src/test/resources/sql/ + @Sql).create/update/delete), call EntityManager.flush() before assertions.JdbcTestUtils.countRowsInTableJdbcTestUtils.countRowsInTableWhereInstanceProvider.<Entity>RepositoryTest.@Transactional
@Rollback
@SpringBootTest
class UserRepositoryTest {
private static final String EMAIL = "test@example.com";
@PersistenceContext
private EntityManager em;
@Autowired
private UserRepository userRepository;
@Autowired
private DataSource dataSource;
private JdbcTemplate jdbcTemplate;
@BeforeEach
void setUp() {
jdbcTemplate = new JdbcTemplate(dataSource);
}
@Test
void testCreate() {
// Arrange
int before = JdbcTestUtils.countRowsInTable(jdbcTemplate, "users");
// Act
User user = userRepository.create(EMAIL, "secret", "John", "Doe");
em.flush();
// Assert
assertEquals(before + 1, JdbcTestUtils.countRowsInTable(jdbcTemplate, "users"));
assertNotNull(user);
}
}
Pure unit tests (no Spring context).
@ExtendWith(MockitoExtension.class)).@Mock.@InjectMocks.assertThrows for failure scenarios.<Service>ImplTest.@ExtendWith(MockitoExtension.class)
class UserServiceImplTest {
private static final long USER_ID = 1L;
@InjectMocks
private UserServiceImpl userService;
@Mock
private UserRepository userRepository;
@Test
void testFindByIdExistingUser() {
// Arrange
when(userRepository.findById(USER_ID)).thenReturn(Optional.of(new User()));
// Act
Optional<User> result = userService.findById(USER_ID);
// Assert
assertTrue(result.isPresent());
}
@Test
void testFindByIdNonExisting() {
// Arrange
when(userRepository.findById(anyLong())).thenReturn(Optional.empty());
// Act
Optional<User> result = userService.findById(1L);
// Assert
assertFalse(result.isPresent());
}
}
Use Mockito helpers or slice tests based on scope.
@WebMvcTest + MockMvc.<Entity>ControllerTest.private User createUserWithId(String email, Long id) throws Exception {
User user = new User(email);
Field idField = User.class.getDeclaredField("id");
idField.setAccessible(true);
idField.set(user, id);
return user;
}
Keep small helper methods (createUserWithId, createMockAuthentication, etc.) inside the test class to reduce
duplication and improve readability.