コード例 #1
0
ファイル: Test_TV.py プロジェクト: KeWei423/Design-Pattern
    def test_screen(self):
        tv = TV
        tv.tv_display(tv)
        tv.dvd_display(tv)

        self.assertEquals(tv.tv_display(tv), TV.tv_display(TV))
        self.assertEquals(tv.dvd_display(tv), TV.dvd_display(TV))
コード例 #2
0
    def test_screen(self):
        remote = Remote
        remote.display_channel(TV)
        remote.display_dvd(TV)

        self.assertEquals(remote.display_channel(TV), TV.tv_display())

        self.assertEquals(remote.display_channel(TV), TV.dvd_display())