From 8d780e9eb042bc1ee76d151d537cb56a07fba6b0 Mon Sep 17 00:00:00 2001 From: Anastasia Shirshova Date: Tue, 1 May 2018 22:45:39 +0300 Subject: [PATCH 01/19] hm is done --- .idea/compiler.xml | 16 + .idea/libraries/Maven__junit_junit_4_12.xml | 13 + .../Maven__org_hamcrest_hamcrest_all_1_3.xml | 13 + .idea/misc.xml | 13 + .idea/modules.xml | 8 + .idea/vcs.xml | 6 + .idea/workspace.xml | 421 ++++++++++++++++++ .../TestGenerateIntSequence.java | 67 +++ .../ru/odnoklassniki/ClassToBeTested.class | Bin 0 -> 2065 bytes .../exampleTests/TestBeforeAndAfter.class | Bin 0 -> 1188 bytes .../TestBeforeClassAndAfterClass.class | Bin 0 -> 718 bytes .../exampleTests/TestHamcrestMatchers.class | Bin 0 -> 345 bytes .../TestSampleNegativeTest1.class | Bin 0 -> 1283 bytes .../exampleTests/TestSampleTest1.class | Bin 0 -> 1410 bytes .../TestGenerateIntSequence.class | Bin 0 -> 2862 bytes .../stringSorter/TestStringSorter.class | Bin 0 -> 2256 bytes techno-atom-sample-1.iml | 16 + 17 files changed, 573 insertions(+) create mode 100644 .idea/compiler.xml create mode 100644 .idea/libraries/Maven__junit_junit_4_12.xml create mode 100644 .idea/libraries/Maven__org_hamcrest_hamcrest_all_1_3.xml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml create mode 100644 .idea/workspace.xml create mode 100644 src/test/java/ru/odnoklassniki/generateIntSequence/TestGenerateIntSequence.java create mode 100644 target/classes/ru/odnoklassniki/ClassToBeTested.class create mode 100644 target/test-classes/ru/odnoklassniki/exampleTests/TestBeforeAndAfter.class create mode 100644 target/test-classes/ru/odnoklassniki/exampleTests/TestBeforeClassAndAfterClass.class create mode 100644 target/test-classes/ru/odnoklassniki/exampleTests/TestHamcrestMatchers.class create mode 100644 target/test-classes/ru/odnoklassniki/exampleTests/TestSampleNegativeTest1.class create mode 100644 target/test-classes/ru/odnoklassniki/exampleTests/TestSampleTest1.class create mode 100644 target/test-classes/ru/odnoklassniki/generateIntSequence/TestGenerateIntSequence.class create mode 100644 target/test-classes/ru/odnoklassniki/stringSorter/TestStringSorter.class create mode 100644 techno-atom-sample-1.iml diff --git a/.idea/compiler.xml b/.idea/compiler.xml new file mode 100644 index 0000000..51be54b --- /dev/null +++ b/.idea/compiler.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__junit_junit_4_12.xml b/.idea/libraries/Maven__junit_junit_4_12.xml new file mode 100644 index 0000000..d411041 --- /dev/null +++ b/.idea/libraries/Maven__junit_junit_4_12.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_hamcrest_hamcrest_all_1_3.xml b/.idea/libraries/Maven__org_hamcrest_hamcrest_all_1_3.xml new file mode 100644 index 0000000..5619316 --- /dev/null +++ b/.idea/libraries/Maven__org_hamcrest_hamcrest_all_1_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..aca9be3 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,13 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..9a49ae6 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 0000000..b5b82a3 --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,421 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1525184114321 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1.8 - - - - - - - - \ No newline at end of file From b2fff6f4e743be447a5d47a044d84e0efb8d8227 Mon Sep 17 00:00:00 2001 From: captainger Date: Fri, 18 May 2018 13:44:09 +0300 Subject: [PATCH 08/19] Delete vcs.xml --- .idea/vcs.xml | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 .idea/vcs.xml diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 94a25f7..0000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file From 03c5e1535478a354c2bcd96900443589e5ed1c5e Mon Sep 17 00:00:00 2001 From: captainger Date: Fri, 18 May 2018 13:44:34 +0300 Subject: [PATCH 09/19] Delete techno-atom-sample-1.iml --- techno-atom-sample-1.iml | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 techno-atom-sample-1.iml diff --git a/techno-atom-sample-1.iml b/techno-atom-sample-1.iml deleted file mode 100644 index 988c706..0000000 --- a/techno-atom-sample-1.iml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - - \ No newline at end of file From ae3c54877440896da96e28e5f7d371bf692137b7 Mon Sep 17 00:00:00 2001 From: captainger Date: Fri, 18 May 2018 13:45:25 +0300 Subject: [PATCH 10/19] Delete ClassToBeTested.class --- .../ru/odnoklassniki/ClassToBeTested.class | Bin 2065 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 target/classes/ru/odnoklassniki/ClassToBeTested.class diff --git a/target/classes/ru/odnoklassniki/ClassToBeTested.class b/target/classes/ru/odnoklassniki/ClassToBeTested.class deleted file mode 100644 index 2f7f0da717b6b5f88089d6892cf3f2dcbc633d05..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2065 zcmbVNT~ixX7=8{(*bqX?x8=)jTagfy00LT|RKQk)5!4_xt=2BdA#A(Z#obM(TzRAa zz$<6$IF2*k)*GmHw0B^;#&OOWUJlniyrdE`+;VjDy>G`rSFVN*VuAlW? z(=K|;dl_jL{T+eXMCPt>-$+@8T}%b1^CvZOEe( zz1>;?ho7-+q(Hc`DBXF*Ve}NV&$EqXowA#k*G<(n-On__xT;kg0~n0sBW%WT10S=2 z>J>~|mMj|9l3Og7r0pLSN#H`Y;(Dp<`MT}+`j*t~vSsOxtIN`^zo-1>jtr-sZzyp7 zM8vGm5;cUo6om5vFAU{u>jiUrTe^g$Th;z;ulotQSHsOXZs8Ncs8{XCN70px;_Cj6 zVe1ntb^Y~>V;2>HPvf|a&jdQ^N7YJjTJnZH;_J1B(&>by*N=InLX~ZVz>Np`eZwlV z3|$pxmHAn6U1LuTQ5<(*XxNG)kAi^yUo$MwKz4oWuFSI=1ILx=ZOC1ivsqF-UhVM4 z>E@MFOCGNrj%3d%!=|pHAX*(WFPdh*h&>$~`T<>$U(uQiC9}EkSoSgEkAnRe z_sPnh5d);-{Qdy#{HS!`9J=u`zatZrW=MFBM6Z%+njF@M{Web(n`D3(FJYKFVyAwX zX_&!fj37bJbC|{`r4VgFYk@JmLa7O_lKnVRlob2F(aaxE82GlzxlM6A?uk6c3qRvr6K;GN5kDUO z)faxmIH5{)lB`d_VvM}UiF1O#$qMQfvRK0`XM6?*`6#~Ai0~skK$`?5qNQzutCFTD l3H~pz6{g8*g%zIR`(eD!^El4}%^TDN8MsW{9M76C|1a$Y2OIzZ From 1fccb4e7e3eddddab515f541d45d43cad5a6c46a Mon Sep 17 00:00:00 2001 From: captainger Date: Fri, 18 May 2018 13:45:40 +0300 Subject: [PATCH 11/19] Delete TestBeforeAndAfter.class --- .../exampleTests/TestBeforeAndAfter.class | Bin 1188 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 target/test-classes/ru/odnoklassniki/exampleTests/TestBeforeAndAfter.class diff --git a/target/test-classes/ru/odnoklassniki/exampleTests/TestBeforeAndAfter.class b/target/test-classes/ru/odnoklassniki/exampleTests/TestBeforeAndAfter.class deleted file mode 100644 index ccb1042aff616c7698551b76bfea7703c21e4bd5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1188 zcmb7?TTc@~7>3^|Ted7Khqh4g0E>XORapd&V2lMdfi!9ao9NxrPRl?$OZI^HKe#mB zdaY43Uibt2QO0k!g{}uK?8S7x!#wY|@63;%-@XI5jwJ(wm`T!J{TBK#fZ5|H(T7X8 zY#@)qaca>(5m!>Us2TXlzIYU@)NWyk`94BLN8Kugj5$fK!TtFOgcJBN4wZu2YZ(4y#zlONt{2CSfMeLd{!~D z=sSE1U3(9$=PUZV{PxIWbZR`t&i=u^5V0pt*bh4Fv|<~F?@lLAkcpEqaymv<+KN0G p(XA8uqmIcLG9+yt;mqmAOe2LEvS&6Xk%>ttW2PefMOqV>{sj#4<{1D0 From 4e8f0733f540c6230518eb878463c8ef7ad52c6e Mon Sep 17 00:00:00 2001 From: captainger Date: Fri, 18 May 2018 13:45:46 +0300 Subject: [PATCH 12/19] Delete TestBeforeClassAndAfterClass.class --- .../TestBeforeClassAndAfterClass.class | Bin 718 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 target/test-classes/ru/odnoklassniki/exampleTests/TestBeforeClassAndAfterClass.class diff --git a/target/test-classes/ru/odnoklassniki/exampleTests/TestBeforeClassAndAfterClass.class b/target/test-classes/ru/odnoklassniki/exampleTests/TestBeforeClassAndAfterClass.class deleted file mode 100644 index 1ac784c26639665dd601c3483d2cf2ae03176fe5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 718 zcmbVKO>Yx16ddnvv+WYv(u9`sReEbVutMCRLJCzmMMZ)T1UDyfTc;auWP7XrElx!s z!JQw47;jV31LA-W&u_->%^Q37=dZ8d0X)T4h6dJCY-EVAp5YEQQ`}8)PoS}Er+t`OREE(k%>RiPGGNVtGpbU^0bi78GWjA zbuK4U)+y&*9^xx?R9dwk3OZ)gIr7TZ;Dtculz%_15y8RvP))rq4TU$~R>tdz>T9Pt zwPQ@_nvBEqd7h!eA-l}WXs1el~&v;rJh`%728wful&|-7@FD9kdP From 93f83973967a3819876c9889bb164c10ddc1d480 Mon Sep 17 00:00:00 2001 From: captainger Date: Fri, 18 May 2018 13:45:53 +0300 Subject: [PATCH 13/19] Delete TestHamcrestMatchers.class --- .../exampleTests/TestHamcrestMatchers.class | Bin 345 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 target/test-classes/ru/odnoklassniki/exampleTests/TestHamcrestMatchers.class diff --git a/target/test-classes/ru/odnoklassniki/exampleTests/TestHamcrestMatchers.class b/target/test-classes/ru/odnoklassniki/exampleTests/TestHamcrestMatchers.class deleted file mode 100644 index 9ff4c6adf1faa96f6cd5610f3c7f82710dbc9e63..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 345 zcmb7S3F(JP)*7Vne(b4goklwh3CX8!i^=#-G?H^^+ zva?@1CEL05ChA`^?UyDHE^0prx3F&A$`Gts8=+ri_slsR`XD0jWT!mOsqEEK`*2Ap zAKc)TzBRG`;IGi>O1{VnDKf(O|9223u|TxaK8gEgrB#nZB>eq&h%YxYb5>%bf$ZcR a^u|Vlf|;`&xy7tD?+n{0SrK-a3927S&sHq} From 28c61418daedca148bdd377b7ce05164fd0e5780 Mon Sep 17 00:00:00 2001 From: captainger Date: Fri, 18 May 2018 13:45:58 +0300 Subject: [PATCH 14/19] Delete TestSampleNegativeTest1.class --- .../exampleTests/TestSampleNegativeTest1.class | Bin 1283 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 target/test-classes/ru/odnoklassniki/exampleTests/TestSampleNegativeTest1.class diff --git a/target/test-classes/ru/odnoklassniki/exampleTests/TestSampleNegativeTest1.class b/target/test-classes/ru/odnoklassniki/exampleTests/TestSampleNegativeTest1.class deleted file mode 100644 index 7990555f3cd3e1b096d4feac92255993dbab3cf8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1283 zcmbVLZBG+H5Pr5Tv>XL$dB?W{QCd(=P%sf=0tAvK2PQ)5=WDyPTdsTcc8`}|11Dom_v<`TpKTmAADBWJw)2!r)voSUsCcV})V%Vyw_^$%MN%N&$D=eRfe|*TsMN6T@y8%d~9t>VDmpU zvCkV^+A8K{tGH_Rxuv)yL zYiuxV{8yW)9epYvDoyGF!+77+t2u-HSAtzLQOChfJTazu<0=TdqoQ^$T`udo!LV7l z(bG;jxBj*iJElkr-*JV~)Z|=$P_~ugAyG@6c*19xyam#{5UbAh0awbaQ=2CWUCelx zx``RGM4GVnK1ZHU8S^l2*L+D33PxxhCC#Co(LS*J4eW}91jc9` zjExp@BxgGgxQ9GxR3{2f#=)E9ZGtl_pSVWyQ$OCK6Od1u(E1peF2)3%r6_U|QzQ+O zG)@0Z6|=O>_28QXVqoU-31;B)scQ^;!HAnruY5)38bep)ZwQVN;STXRl7I Date: Fri, 18 May 2018 13:46:05 +0300 Subject: [PATCH 15/19] Delete TestSampleTest1.class --- .../exampleTests/TestSampleTest1.class | Bin 1410 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 target/test-classes/ru/odnoklassniki/exampleTests/TestSampleTest1.class diff --git a/target/test-classes/ru/odnoklassniki/exampleTests/TestSampleTest1.class b/target/test-classes/ru/odnoklassniki/exampleTests/TestSampleTest1.class deleted file mode 100644 index eefd3da03144a504a99d7aac2a36cab3f6caa3ad..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1410 zcmb7DT~8B16g^W~+OCUyg9z$^fCYpVzW^~Ni26VpFcx{AmH`H~JGeV5__OpujSv0+ zf0XggY$S2z%tey^x$q0)0in>*1I?&3On^H_HA z5Ra&PEp>S^_QbiUC0guzDy#{wYK!)G5O_7yE)nPP*u@h(WtdKxZKMWX@Y+#I$YaID zD%M;)!y3bsEvSvcO^MzmgJIEvY(;HIn^6jHNr>?OHGdk1X@ei|@X+6>9*df8b5%aY zTGZ)9s)Pc=Web+de;dhAS9BzJodz;^g_|LNYCr)Eak!Kc?JdNT;o-V@;eD46YJ=Jt z(G{-gYouR)NO(YRE?3&xGRWT4y{#G%Ov0uAm|1x+Geoj|bn>ysnSrja$Ql89gJc~W>PLYjM(At=M{V>*lfFV2 zbGN1E8uax3ls-cA(Uu&FjT|ln$E@JZrr;{FR?rzjH~qe&a9L5RI8OObv?w|qisM#s z;_r&ZPDPItC;zEl From 94db5ff5472cd5174885c51a6f91a135cbe662ba Mon Sep 17 00:00:00 2001 From: captainger Date: Fri, 18 May 2018 13:46:15 +0300 Subject: [PATCH 16/19] Delete TestStringSorter.class --- .../stringSorter/TestStringSorter.class | Bin 2256 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 target/test-classes/ru/odnoklassniki/stringSorter/TestStringSorter.class diff --git a/target/test-classes/ru/odnoklassniki/stringSorter/TestStringSorter.class b/target/test-classes/ru/odnoklassniki/stringSorter/TestStringSorter.class deleted file mode 100644 index e1d243dcc3934ed8a39e48a4baf7dfa505fdb262..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2256 zcmb7GZBrXn6n-`dO`0w(EH7;>mH?#bA>#YX60T(1Wfylh)%vMA zEOM0Cbgm7Zr56GWdE;O%h!-+p=evxxC?ewCsPL^MkEj z-e>mMUT?>_N&n>RH$}1K8MfudF{j|8MdrCIys~47^*L)Pq!t^^t^p%!!aG zQX#+KPkx?NAE{WA@rzhjF#i8Kljqp%xTUqbY)1t>O;w{I6r|cB&&cjC*waEDkRW)E zY|;AZPd~^DYr`ukxSVe9wsy_fo)%?4bu~L|%5{Z9YMn%+uxNXWWz%GDw8pOSpOn}7 zXqZCdZpceye9K$`AS%F&z z@HrsH{%Q=NpFbD!i9wNH1{`1FD#uyj+>!YU%3}%3tA1i1$5CQv#2Do6D`atn=#opOhF9kj#U-Se8o${112{}6LeC6FaE6gaX)n3g zG-s(fM~zHBjWJ3x#|&qM2)h~mOe>kupr+=v&IL`?I%P)M(QJp0V?MfkboD|FWl4H?59yw)ruyiW zDfIg2dye;69Hz%OdFRM`g1j%Hhkq1Ku+*nm*3(=M;aUs-;RgS~2LFKu|K2wKQu8AI JS>i`9{vR!FNw@$2 From 6fe90b2f9b4d5ab300abb5553b47f4631967c10e Mon Sep 17 00:00:00 2001 From: captainger Date: Fri, 18 May 2018 13:46:25 +0300 Subject: [PATCH 17/19] Delete TestGenerateIntSequence.class --- .../TestGenerateIntSequence.class | Bin 2862 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 target/test-classes/ru/odnoklassniki/generateIntSequence/TestGenerateIntSequence.class diff --git a/target/test-classes/ru/odnoklassniki/generateIntSequence/TestGenerateIntSequence.class b/target/test-classes/ru/odnoklassniki/generateIntSequence/TestGenerateIntSequence.class deleted file mode 100644 index 1cdfddc722a7fe2de11d4766432e944b7eb79eb7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2862 zcmbuBTXz#x6vzLQ+k`NMkY11$VL-4c(S~akTUts545qC%v52TRO-_<&Co?cJDd>w& zuH`rJ86GgWmM))t^4s_Z{?AO3rZ;3QleOl|*|X2yzkNAp=C7B({Q=+t9;a{`(<#j0 zS`xD<9Kc)(*D)_IH&R%@$4T5&aZAo`%lRj9u9Ls$K@@ODiaza%Vp3F;Mi#rGc=sle z#FA8AR`FR9pQkX26*(_Oe|+`o?RX=4i`;Z zEVY_z!YvzX7A2XYQ!%Vn!!_l+BaHbC(^D{8bX$3+YC9X2;d!>XVdm??7Ovrog6)^Y zqn5BMB3~Ase|xulTEV!_M@3=R{l;>wt6%VLK57|O*(vy<=`A=d+b8ad@LCpc(#3US z)5y1c)5;f3&!?4|&nXp*s`KEyJ$o2`K8qot~wE)XgUq@z6IN+f(tSf@3T6 zX*R{G>6r|A-nJdz2p&uSj$6;Kx0t*jFfP|+6kYlS$My}=_EyY#!w)mbObz#|6d082 ziVCASC*_5jj5G*TxCL)X)ah(f^q|TO*LiF!P*{#L{UKNuRjqlq-f9Zl@97iiYH0Ts zYwR^bih_6B6|9U~ZU~#vFB(r)4Xd@=O{(Oy+={qm%JLsC6L62>P0A{0cn4=x+|%$C z?z5V-tXn}fb*H9#o%-vhXOH_jXNINwj($bM*Z4-ow;CScI}HZbR8%xnL4R*(`w`{WsuNj*wK2^c=BLVR#w4O#gJikH>He}T7Anxf!qk=o?NJR7S8;ijm=H6m7(Re z^`O%Sw?w^0<<{BdXF(n%W#@*FjVG!K2D|j^+3qG&FqAD6CU$IZ_PrYLFV}b|WV_G% zTZAgZa{o4rX2qq0{G#Dk8p35&)u2Jk4mV}CZbBY#3h2{DH}y%dVb*R<=?yUF%($}>GlwBQU?kjviRy>ef$fskU! z;Q?lG*9`ZAbQ3}chk}~+j$*z=ydV>Nr4$rsp_Sk;XMW?^J9p%pCR!JaZFqZmI!4LN z{tS*K8mk%RPUoF0NINOoSrndU)S3ICY^NE5Vt2H7n(P6-M;=yjivQEWD>nf}o@%_F zq3d0!WID(^r`H|2>$9#fXIlM4TzFC^>-Y&7frt;Sm|CY5)AQZFeHc?E47i@gLMolj+62v zCOKYU_GBtT){7lhm89EQL&@t{FZWoVF&4>MR++0vG1tbyA!xZ5IHcgGHVzLVor}Ie zCW1e4;5i0E*-$RFOE!{=?~rX}{siLyif!99LreZ-BwiPUImtRM3sP) zye_IMy{Oh1lZ8P|S?wp5u5MZ$D+lWMvQY<1K8qQPP1`RhefE zSNP--(zuLcnCkJR`8_y=4}!I$9n$^!;lm!yMu%oBb0R$z;GFE@=-Y4x=x{sEG?M(D d9l&)ynPpSX@%elY=SUyU*ni+$WpELE^e-z+wg> Date: Fri, 18 May 2018 13:47:19 +0300 Subject: [PATCH 18/19] Delete TestGenerateIntSequence.java --- .../TestGenerateIntSequence.java | 67 ------------------- 1 file changed, 67 deletions(-) delete mode 100644 src/test/java/ru/odnoklassniki/generateIntSequence/TestGenerateIntSequence.java diff --git a/src/test/java/ru/odnoklassniki/generateIntSequence/TestGenerateIntSequence.java b/src/test/java/ru/odnoklassniki/generateIntSequence/TestGenerateIntSequence.java deleted file mode 100644 index 01bbece..0000000 --- a/src/test/java/ru/odnoklassniki/generateIntSequence/TestGenerateIntSequence.java +++ /dev/null @@ -1,67 +0,0 @@ -package ru.odnoklassniki.generateIntSequence; - -import org.junit.Assert; -import org.junit.Test; -import ru.odnoklassniki.ClassToBeTested; - -import java.util.List; - -import static org.hamcrest.Matchers.equalTo; -import static org.hamcrest.Matchers.hasSize; -import static org.hamcrest.Matchers.hasItems; - -public class TestGenerateIntSequence { - - @Test - public void testLengthOfSequenceIsEqualToItemsCount() throws Exception{ - final List Result = ClassToBeTested.generateIntSequence(0,5); - Assert.assertThat( - "The length of sequence isn't equal to 5", - Result, - hasSize(equalTo(5)) - ); - } - - @Test - public void testSequenceContainsRightNumbers() throws Exception{ - final List Result = ClassToBeTested.generateIntSequence(-2,4); - Assert.assertThat( - "The length of sequence isn't equal to 3", - Result, - hasItems(-2,-1,0,1) - ); - } - @Test - public void testSequenceIsCorrect() throws Exception{ - - final List Result = ClassToBeTested.generateIntSequence(4,3); - Assert.assertNotNull(Result); - Assert.assertEquals(3, Result.size()); - Assert.assertEquals(4, (long)Result.get(0)); - Assert.assertEquals(5, (long)Result.get(1)); - Assert.assertEquals(6, (long)Result.get(2)); - } - - @Test - public void testIfItemCounterIsNegativeExceptionThrown() throws Exception{ - try{ - ClassToBeTested.generateIntSequence(1,-9); - Assert.fail("Method didn't throw an exception when ItemCounter is negative"); - } - catch(IllegalArgumentException e){ - Assert.assertEquals("itemsCount must be greater than 0",e.getMessage()); - } - } - - @Test - public void testIfFinishNumberIsGreaterThenIntMaxValueExceptionThrown() throws Exception{ - try { - ClassToBeTested.generateIntSequence(2147483600 ,54); - Assert.fail("Method didn't throw an exception when final number is greater then integer max_value"); - } - catch(IllegalArgumentException e){ - Assert.assertEquals("can't generate an int greater than integer's max value",e.getMessage()); - } - } - -} From 72e3dd60922bf3a423674327fad0fdf38e1d7829 Mon Sep 17 00:00:00 2001 From: captainger Date: Fri, 18 May 2018 13:52:05 +0300 Subject: [PATCH 19/19] Create TestGenerateIntSequence.java --- .../TestGenerateIntSequence.java | 66 +++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 src/test/java/ru/odnoklassniki/generateIntSequence/TestGenerateIntSequence.java diff --git a/src/test/java/ru/odnoklassniki/generateIntSequence/TestGenerateIntSequence.java b/src/test/java/ru/odnoklassniki/generateIntSequence/TestGenerateIntSequence.java new file mode 100644 index 0000000..4c48447 --- /dev/null +++ b/src/test/java/ru/odnoklassniki/generateIntSequence/TestGenerateIntSequence.java @@ -0,0 +1,66 @@ +package ru.odnoklassniki.generateIntSequence; + + +import org.junit.Assert; +import org.junit.Test; +import ru.odnoklassniki.ClassToBeTested; + +import java.util.List; + +import static org.hamcrest.Matchers.equalTo; +import static org.hamcrest.Matchers.hasSize; + +public class TestGenerateIntSequence { + + @Test + public void testLengthOfSequenceIsEqualToItemsCount() throws Exception { + final int startingNumber = 0; + final int itemsCounts = 5; + final List result = ClassToBeTested.generateIntSequence(startingNumber, itemsCounts); + + Assert.assertThat( + "The length of sequence isn't equal to 5", + result, + hasSize(equalTo(itemsCounts)) + ); + } + + @Test + public void testSequenceIsCorrect() throws Exception { + final int startingNumber = 4; + final int itemsCounts = 3; + final List result = ClassToBeTested.generateIntSequence(startingNumber, itemsCounts); + + Assert.assertNotNull(result); + Assert.assertEquals(3, result.size()); + Assert.assertEquals(4, result.get(0).intValue()); + Assert.assertEquals(5, result.get(1).intValue()); + Assert.assertEquals(6, result.get(2).intValue()); + } + + @Test + public void testIfItemCounterIsNegativeExceptionThrown() throws Exception { + final int startingNumber = 1; + final int itemsCounts = -9; + + try { + ClassToBeTested.generateIntSequence(startingNumber, itemsCounts); + Assert.fail("Method didn't throw an exception when ItemCounter is negative"); + } catch (IllegalArgumentException e) { + Assert.assertEquals("itemsCount must be greater than 0", e.getMessage()); + } + } + + @Test + public void testIfFinishNumberIsGreaterThenIntMaxValueExceptionThrown() throws Exception { + final int startingNumber = Integer.MAX_VALUE - 1; + final int itemsCounts = 50; + + try { + ClassToBeTested.generateIntSequence(startingNumber, itemsCounts); + Assert.fail("Method didn't throw an exception when final number is greater then integer.MAX_VALUE"); + } catch (IllegalArgumentException e) { + Assert.assertEquals("can't generate an int greater than integer's max value", e.getMessage()); + } + } +}