<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>shuji_w6e</author_name>
  <author_url>https://blog.hatena.ne.jp/shuji_w6e/</author_url>
  <blog_title>やさしいデスマーチ</blog_title>
  <blog_url>https://shuji-w6e.hatenadiary.org/</blog_url>
  <categories>
    <anon>TDD</anon>
    <anon>Python</anon>
  </categories>
  <description>前回はオブジェクトに副作用があるという設計上の問題を解決する為に、timesメソッドの戻り値をDollarに修正しました。この変更はバリューオブジェクトパターンを適用したと考える事ができます。バリューオブジェクトとはその名前が表すようにオブジェクトが値そのものを表現するパターンです。つまり、Dollar(10)とDollar(10)は等価であり、Dollar(10)とDollar(15)は等価でない事が必要になります。まずはこの事を確認する為のテストを書きましょう。 def test_eq(self): &quot;&quot;&quot; 等価性に関するテスト &quot;&quot;&quot; self.assertEqual(Dollar(5)…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fshuji-w6e.hatenadiary.org%2Fentry%2F20090616%2F1245139644&quot; title=&quot; PythonでTDD入門(3) - バリューオブジェクトと等価性 - やさしいデスマーチ&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2009-06-16 17:07:24</published>
  <title> PythonでTDD入門(3) - バリューオブジェクトと等価性</title>
  <type>rich</type>
  <url>https://shuji-w6e.hatenadiary.org/entry/20090616/1245139644</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
