Upgrade to Pro — share decks privately, control downloads, hide ads and more …

クリーンアーキテクチャとTDDの中でGitHub Copilotを使ってみた! - NIFTY...

クリーンアーキテクチャとTDDの中でGitHub Copilotを使ってみた! - NIFTY Tech Talk #14

ニフティ株式会社

October 02, 2023
Tweet

Video


Resources

GitHub Copilotの導入や活用 - NIFTY Tech Talk #14

https://nifty.connpass.com/event/295966/

More Decks by ニフティ株式会社

Other Decks in Programming

Transcript

  1. def test_must_bill_in_bill_month(self): subscription = Subscription( ... ) # mockͷઃఆ ...

    test_cases: list[dict] = [ { ... } ] for test_case in test_cases: with self.subTest(test_case["name"]): # ࣮ߦ actual = ... # ݺͼग़͠ςετ self.assertEqual(...) # returnͷςετ self.assertEqual(...) UsecaseͷςετͰ େ͖ͳҧ͍͕ ςετέʔεͷॻ͖ํʹ஫໨
  2. def test_subscription_is_active_with_single_entry(self): # ਖ਼ৗܥ:αϒεΫϦϓγϣϯ͕ACTIVE׌ͭ1݅ͷ࣌ request_value = { ... } rs

    = ..., ɹwith self.app.app_context(): # ਖ਼ৗܥ result = self.interactor.handle( request=request_value["request"], _txs=request_value["transaction"], ) # ฦΓ஋͕True͔Ͳ͏͔ΛνΣοΫ self.assertEqual(...) self.assertEqual(...) def test_subscription_is_active_with_single_entry(self): # ਖ਼ৗܥ:αϒεΫϦϓγϣϯ͕ACTIVE׌ͭ2݅Ҏ্ͷ࣌ ... UsecaseͷςετͰ େ͖ͳҧ͍͕ ͪ͜ΒͰ͸ςετέʔε͝ͱ ʹϝιουΛ෼͚͍ͯΔ