Listing 8 shows a similar implementation of the Account class.
清单8显示了account类的类似实现。
Surprisingly, I can't think of anything for objects of the Account class to do in this system.
令人惊讶的是,我想不出Account类的对象能够在此系统中做什么。
Notice what our code has so far: first, our Account class isn't a bean (it essentially has a getter -- but no setter -- for its one data member).
注意一下目前我们的代码有哪些东西:首先,我们的Account类不是一个bean (实际上,对于它的一个数据成员它有一个getter方法――但是没有setter 方法)。
Since you should be writing tests first, you should have a failing test that tells you what the Account class needs to look like. Your class should look similar to Listing 1.
既然您首先应该编写测试,您就应该有一个失败测试,它会告诉您account类应该是什么样子。
Since you should be writing tests first, you should have a failing test that tells you what the Account class needs to look like. Your class should look similar to Listing 1.
既然您首先应该编写测试,您就应该有一个失败测试,它会告诉您account类应该是什么样子。
应用推荐