java库笔记 java lib notes

本文介绍了Hamcrest在UI验证、数据过滤及单元测试中的应用,并探讨了Spring Boot如何简化Spring配置。此外还概述了Java实用工具如Objenesis、Mockito及AspectJ等的功能。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

.
    以下有摘录自网上的,也有自己理解总结的,有时有标记,有时没有

Hamcrest:UI验证,数据过滤,单元测试   https://code.google.com/archive/p/hamcrest/wikis/Tutorial.wiki   
    所以Hamcrest的作用是 数据验证(自总结)
    The Hamcrest Tutorial

    Introduction

    Hamcrest is a framework for writing matcher objects allowing 'match' rules to be defined declaratively. There are a number of situations where matchers are invaluble, such as UI validation, or data filtering, but it is in the area of writing flexible tests that matchers are most commonly used. This tutorial shows you how to use Hamcrest for unit testing.

    When writing tests it is sometimes difficult to get the balance right between overspecifying the test (and making it brittle to changes), and not specifying enough (making the test less valuable since it continues to pass even when the thing being tested is broken). Having a tool that allows you to pick out precisely the aspect under test and describe the values it should have, to a controlled level of precision, helps greatly in writing tests that are "just right". Such tests fail when the behaviour of the aspect under test deviates from the expected behaviour, yet continue to pass when minor, unrelated changes to the behaviour are made.



spring boot 作用之一 是自动进行 spring繁杂的配置 以简化spring的使用 (自总结)

jul : java.util.logging 的简写
    所以有 jul-to-slf4j这样的转化库(自总结)
    
    


objenesis:构建实例:Class.newInstance()的替代者并试图弥补其不工作的情形
    To instantiate a new object of a particular class.
    Java already supports this dynamic instantiation of classes using Class.newInstance(). However, this only works if the class has an appropriate constructor. There are many times when a class cannot be instantiated this way, such as when the class contains:

    Constructors that require arguments.
    Constructors that have side effects.
    Constructors that throw exceptions.
    As a result, it is common to see restrictions in libraries stating that classes must require a default constructor. Objenesis aims to overcome these restrictions by bypassing the constructor on object instantiation.
    from : http://objenesis.org/


mockito:...

AspectJ: java的 面向方面AOP 编程
    AspectJ is an aspect-oriented programming (AOP) extension created at PARC for the Java programming language.
    AspectJweaver: AspectJ编织者
    
byte-buddy: java字节码运行时操纵,无需编译器帮助
    Byte Buddy is a code generation and manipulation library for creating and modifying Java classes during the runtime of a Java application and without the help of a compiler    
View Code

 

 

 

https://github.com/proooogram/memory_aid/tree/master/programmer notes

 

转载于:https://www.cnblogs.com/proooogram/p/7026055.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值