Anıl Şenocak Anıl Şenocak
Yazılım Mühendisi
Sadece şu etikete sahip yazıları göster:Testing
Mockito: doReturn Vs thenReturn
thenReturn() normal mock'lar için varsayılan ve en okunabilir yöntemdir; sabit bir dönüş değeri tanımlamak istediğinizde tercih edilir. doReturn() ise özellikle @Spy kullanılan durumlarda gerçek metodun çalışmasını engellemek için kullanılır. Böylece yan etkiler veya istenmeyen exception'lar önlenir. Kısacası, mock için thenReturn(), spy için ise gerektiğinde doReturn() kullanmak en doğru yaklaşımdır.
Testing Spring AI MCP Tools in Swagger UI
If you are building AI agents with Spring AI, you are likely exploring the Model Context Protocol (MCP). MCP is a game-changer for AI applications, standardizing how AI models interact with external tools and data sources.
🥒Cucumber Integration Testing in Spring Boot and Kotlin
This guide demonstrates how to implement robust Behavior-Driven Development (BDD) integration tests using Cucumber in a Spring Boot Kotlin application with JWT authentication. The setup leverages Testcontainers for database isolation and provides a clean, maintainable testing architecture.
E-posta Bildirimine Abone Ol
Yeni bir yazı yayımlandığında e-posta alın.