Java

  • Published on
    以方法作为参数传递时,Ruby有proc,C#有Delegate,而JavaScript则更不用说,唯独Java在这方面很尴尬。但Java8提供了Lambda表达式和函数接口,这无异是Javer的福音,也使得Java这门语言更佳的优秀和易用。"
  • Published on
    Both mock and stub are mummy objects for unit test in spring.When you have lots of dependencies in unit test, creating fake object to reduce dependency is really recommended. Therefore, we use mock and stub. But there are some differences between mock and stub.