コード例 #1
0
ファイル: jnc_test.py プロジェクト: krishnact/Netconf-Async
 def test__camelize__when_string_contains_underlines(self):
     result1 = jnc.camelize('test_string_')
     result2 = jnc.camelize('TEST_STRING_')
     expected = 'test_string_'
     message = 'should not remove underlines'
     assert result1 == expected, message + ' but was ' + result1
     assert result2 == expected, message + ' but was ' + result2
コード例 #2
0
ファイル: jnc_test.py プロジェクト: Karunakaran-SL/JNC
 def test__camelize__when_string_contains_underlines(self):
     result1 = jnc.camelize('test_string_')
     result2 = jnc.camelize('TEST_STRING_')
     expected = 'test_string_'
     message = 'should not remove underlines'
     assert result1 == expected, message + ' but was ' + result1
     assert result2 == expected, message + ' but was ' + result2
コード例 #3
0
ファイル: jnc_test.py プロジェクト: krishnact/Netconf-Async
 def test__camelize__when_string_contains_hyphens(self):
     result1 = jnc.camelize('test-string')
     result2 = jnc.camelize('TEST-STRING')
     expected = 'testString'
     message = 'should remove hyphens'
     assert result1 == expected, message + ' but was ' + result1
     assert result2 == expected, message + ' but was ' + result2
コード例 #4
0
ファイル: jnc_test.py プロジェクト: Karunakaran-SL/JNC
 def test__camelize__when_string_contains_hyphens(self):
     result1 = jnc.camelize('test-string')
     result2 = jnc.camelize('TEST-STRING')
     expected = 'testString'
     message = 'should remove hyphens'
     assert result1 == expected, message + ' but was ' + result1
     assert result2 == expected, message + ' but was ' + result2
コード例 #5
0
ファイル: jnc_test.py プロジェクト: krishnact/Netconf-Async
 def test__camelize__when_string_is_single_character(self):
     result = jnc.camelize('A')
     expected = 'a'
     message = 'should return lower case version of string'
     assert result == expected, message + ' but was ' + result
コード例 #6
0
ファイル: jnc_test.py プロジェクト: krishnact/Netconf-Async
 def test__camelize__when_string_is_none(self):
     result = jnc.camelize(None)
     expected = ''
     message = 'should return empty string'
     assert result == expected, message + ' but was ' + result
コード例 #7
0
ファイル: jnc_test.py プロジェクト: krishnact/Netconf-Async
 def test__camelize__when_string_is_upper_camelcase(self):
     result = jnc.camelize('TestString')
     expected = 'testString'
     message = 'should return string decapitalized'
     assert result == expected, message + ' but was ' + result
コード例 #8
0
ファイル: jnc_test.py プロジェクト: krishnact/Netconf-Async
 def test__camelize__when_string_is_lower_camelcase(self):
     result = jnc.camelize('testString')
     expected = 'testString'
     message = 'should return string unchanged'
     assert result == expected, message + ' but was ' + result
コード例 #9
0
ファイル: jnc_test.py プロジェクト: Karunakaran-SL/JNC
 def test__camelize__when_string_is_lower_camelcase(self):
     result = jnc.camelize('testString')
     expected = 'testString'
     message = 'should return string unchanged'
     assert result == expected, message + ' but was ' + result
コード例 #10
0
ファイル: jnc_test.py プロジェクト: Karunakaran-SL/JNC
 def test__camelize__when_string_contains_many_dots_and_hyphens(self):
     result = jnc.camelize('test--...STR.ING.')
     expected = 'test-.StrIng.'  # 'testStrIng' might be better
     message = 'will remove all except consecutive and trailing'
     assert result == expected, message + ' but was ' + result
コード例 #11
0
ファイル: jnc_test.py プロジェクト: Karunakaran-SL/JNC
 def test__camelize__when_string_contains_trailing_hyphen(self):
     result = jnc.camelize('test-')
     expected = 'test-'  # 'test' might be better
     message = 'will not remove hyphen'
     assert result == expected, message + ' but was ' + result
コード例 #12
0
ファイル: jnc_test.py プロジェクト: Karunakaran-SL/JNC
 def test__camelize__when_string_is_single_character(self):
     result = jnc.camelize('A')
     expected = 'a'
     message = 'should return lower case version of string'
     assert result == expected, message + ' but was ' + result
コード例 #13
0
ファイル: jnc_test.py プロジェクト: Karunakaran-SL/JNC
 def test__camelize__when_string_is_none(self):
     result = jnc.camelize(None)
     expected = ''
     message = 'should return empty string'
     assert result == expected, message + ' but was ' + result
コード例 #14
0
ファイル: jnc_test.py プロジェクト: Karunakaran-SL/JNC
 def test__camelize__when_string_is_upper_camelcase(self):
     result = jnc.camelize('TestString')
     expected = 'testString'
     message = 'should return string decapitalized'
     assert result == expected, message + ' but was ' + result
コード例 #15
0
ファイル: jnc_test.py プロジェクト: krishnact/Netconf-Async
 def test__camelize__when_string_contains_trailing_hyphen(self):
     result = jnc.camelize('test-')
     expected = 'test-'  # 'test' might be better
     message = 'will not remove hyphen'
     assert result == expected, message + ' but was ' + result
コード例 #16
0
ファイル: jnc_test.py プロジェクト: krishnact/Netconf-Async
 def test__camelize__when_string_is_all_upper_case(self):
     result = jnc.camelize('TESTSTRING')
     expected = 'teststring'
     message = 'should convert to lower case'
     assert result == expected, message + ' but was ' + result
コード例 #17
0
ファイル: jnc_test.py プロジェクト: krishnact/Netconf-Async
 def test__camelize__when_string_contains_many_dots_and_hyphens(self):
     result = jnc.camelize('test--...STR.ING.')
     expected = 'test-.StrIng.'  # 'testStrIng' might be better
     message = 'will remove all except consecutive and trailing'
     assert result == expected, message + ' but was ' + result
コード例 #18
0
ファイル: jnc_test.py プロジェクト: Karunakaran-SL/JNC
 def test__camelize__when_string_is_all_upper_case(self):
     result = jnc.camelize('TESTSTRING')
     expected = 'teststring'
     message = 'should convert to lower case'
     assert result == expected, message + ' but was ' + result