2025/02/07 4

JUnit5를 이용한 단위 테스트

소스 작성중 JUnit 이 임포트가 안되는 문제가 생김.그래들엔 분명 spring-boot-starter-test 의존성이 있고, 책에선 이게 JUnit5, 모키토, 어서트J 같은 테스트 라이브러리를 프로젝트로 임포트 한다고 써있는데...! package com.polarbookshop.catalogservice.domain;import jakarta.validation.Validation;import jakarta.validation.Validator;import jakarta.validation.ValidatorFactory;import org.junit.jupiter.api.BeforeAll;//Book 객체의 유효성 검사 제약조건을 검증하기 위한 단위 테스트public class BookValid..

[Java] 21. Merge Two Sorted Lists

난이도: EASY문제더보기You are given the heads of two sorted linked lists list1 and list2. Merge the two lists into one sorted list. The list should be made by splicing together the nodes of the first two lists. Return the head of the merged linked list. Example 1: Input: list1 = [1,2,4], list2 = [1,3,4] Output: [1,1,2,3,4,4]Example 2: Input: list1 = [], list2 = [] Output: [] Example 3: Input: list1 = []..

[SQL50] 595. Big Countries

난이도: EASY 문제더보기Table: World +-------------+---------+ | Column Name | Type    | +-------------+---------+ | name        | varchar | | continent   | varchar | | area        | int     | | population  | int     | | gdp         | bigint  | +-------------+---------+ name is the primary key (column with unique values) for this table. Each row of this table gives information about the name of a country..

[SQL50] 584. Find Customer Referee

난이도: EASY 문제더보기Table: Customer+-------------+--------------+ | Column Name | Type | +-------------+--------------+ | id                | int          | | name         | varchar   | | referee_id  | int           | +-------------+--------------+ In SQL, id is the primary key column for this table. Each row of this table indicates the id of a customer, their name, and the id of the customer who ref..