From 3702a43c9dda36ad446d36881f83756f91116830 Mon Sep 17 00:00:00 2001 From: Y_SAKAI Date: Fri, 5 Aug 2022 23:58:09 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20=E7=99=BB=E9=8C=B2=E3=81=95?= =?UTF-8?q?=E3=82=8C=E3=81=A6=E3=81=97=E3=81=BE=E3=81=A3=E3=81=9F=E4=B8=8D?= =?UTF-8?q?=E8=A6=81=E3=81=AA=E3=83=95=E3=82=A1=E3=82=A4=E3=83=AB=E3=82=92?= =?UTF-8?q?=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tests/util/test_counter_object.py | 114 ------------------ 1 file changed, 114 deletions(-) delete mode 100644 ecs/crm-datafetch/tests/util/test_counter_object.py diff --git a/ecs/crm-datafetch/tests/util/test_counter_object.py b/ecs/crm-datafetch/tests/util/test_counter_object.py deleted file mode 100644 index 8bf677a0..00000000 --- a/ecs/crm-datafetch/tests/util/test_counter_object.py +++ /dev/null @@ -1,114 +0,0 @@ -import pytest -from src.util.counter_object import CounterObject - - -class TestCounterObject: - - def test_describe(self) -> int: - """ - Cases: - カウンターオブジェクトにて保持した値を返すこと - Arranges: - なし - Expects: - 問い合わせた値が期待値と一致する - """ - - # Act - sut = CounterObject() - actual = sut.describe() - - # Expects - assert actual == 1 - - def test_raise_describe(self) -> int: - """ - Cases: - カウンターオブジェクトの保持した値を問い合わせる際、引数を渡すと例外が発生すること - Arranges: - なし - Expects: - 問い合わせた値が期待値と一致する - """ - - # Act - with pytest.raises(Exception) as e: - sut = CounterObject() - sut.describe(1) - - # Expects - assert str(e.value) == 'describe() takes 1 positional argument but 2 were given' - - def test_increment(self) -> int: - """ - Cases: - カウンターオブジェクトにて保持した値がインクリメントされていること - Arranges: - なし - Expects: - 戻り値が期待値と一致する - """ - - # Act - sut = CounterObject(5) - sut.increment() - actual = sut.increment() - - # Expects - assert actual == 7 - - def test_raise_increment(self) -> int: - """ - Cases: - 文字列を引数で渡すことで、例外が発生すること - Arranges: - なし - Expects: - 発生した例外が期待値と一致する - """ - - # Act - with pytest.raises(Exception) as e: - sut = CounterObject(5) - sut.increment('aaa') - sut.increment('aaa') - - # Expects - assert str(e.value) == "unsupported operand type(s) for +=: 'int' and 'str'" - - def test_decrement(self) -> int: - """ - Cases: - カウンターオブジェクトにて保持した値がデクリメントされていること - Arranges: - なし - Expects: - 戻り値が期待値と一致する - """ - - # Act - sut = CounterObject(5) - sut.decrement(2) - actual = sut.decrement(2) - - # Expects - assert actual == 1 - - def test_raise_decrement(self) -> int: - """ - Cases: - 文字列を引数で渡すことで、例外が発生すること - Arranges: - なし - Expects: - 発生した例外が期待値と一致する - """ - - # Act - with pytest.raises(Exception) as e: - sut = CounterObject(5) - sut.decrement('aaa') - sut.decrement('aaa') - - # Expects - assert str(e.value) == "unsupported operand type(s) for -=: 'int' and 'str'"