@@ -245,38 +245,38 @@ public void getBasalLocation_centroidsSame_returnsFirstLocation() {
245245 }
246246
247247 @ Test
248- public void getLowerDeadpanLocation_loc1HasLessDeadpan_returnsLoc1 () {
248+ public void getLessDeadpanLocation_loc1HasLessDeadpan_returnsLoc1 () {
249249 PottsLocation loc1 = mock (PottsLocation .class );
250250 PottsLocation loc2 = mock (PottsLocation .class );
251251 Location gmc =
252- PottsModuleFlyStemProliferation .getLowerDeadpanLocation (loc1 , 1.0 , loc2 , 5.0 );
252+ PottsModuleFlyStemProliferation .getLessDeadpanLocation (loc1 , 1.0 , loc2 , 5.0 );
253253 assertEquals (loc1 , gmc );
254254 }
255255
256256 @ Test
257- public void getLowerDeadpanLocation_loc2HasLessDeadpan_returnsLoc2 () {
257+ public void getLessDeadpanLocation_loc2HasLessDeadpan_returnsLoc2 () {
258258 PottsLocation loc1 = mock (PottsLocation .class );
259259 PottsLocation loc2 = mock (PottsLocation .class );
260260 Location gmc =
261- PottsModuleFlyStemProliferation .getLowerDeadpanLocation (loc1 , 5.0 , loc2 , 1.0 );
261+ PottsModuleFlyStemProliferation .getLessDeadpanLocation (loc1 , 5.0 , loc2 , 1.0 );
262262 assertEquals (loc2 , gmc );
263263 }
264264
265265 @ Test
266- public void getLowerDeadpanLocation_equalDeadpan_returnsSecondLocation () {
266+ public void getLessDeadpanLocation_equalDeadpan_returnsSecondLocation () {
267267 PottsLocation loc1 = mock (PottsLocation .class );
268268 PottsLocation loc2 = mock (PottsLocation .class );
269269 Location gmc =
270- PottsModuleFlyStemProliferation .getLowerDeadpanLocation (loc1 , 2.5 , loc2 , 2.5 );
270+ PottsModuleFlyStemProliferation .getLessDeadpanLocation (loc1 , 2.5 , loc2 , 2.5 );
271271 assertEquals (loc2 , gmc );
272272 }
273273
274274 @ Test
275- public void getLowerDeadpanLocation_bothZero_returnsSecondLocation () {
275+ public void getLessDeadpanLocation_bothZero_returnsSecondLocation () {
276276 PottsLocation loc1 = mock (PottsLocation .class );
277277 PottsLocation loc2 = mock (PottsLocation .class );
278278 Location gmc =
279- PottsModuleFlyStemProliferation .getLowerDeadpanLocation (loc1 , 0.0 , loc2 , 0.0 );
279+ PottsModuleFlyStemProliferation .getLessDeadpanLocation (loc1 , 0.0 , loc2 , 0.0 );
280280 assertEquals (loc2 , gmc );
281281 }
282282
@@ -1377,13 +1377,15 @@ void testDaughterStem_RuleBased_TfRatioTrue() {
13771377 when (parameters .getString ("proliferation/DIFFERENTIATION_RULESET" )).thenReturn ("tfRatio" );
13781378 when (parameters .getDouble ("proliferation/TF_RATIO" )).thenReturn (2.0 );
13791379
1380- when (stemCell .getStemType ()).thenReturn (PottsCellFlyStem .StemType .MUDMUT );
1381-
1380+ when (stemCell .getStemType ()).thenReturn (PottsCellFlyStem .StemType .WT );
13821381 PottsModuleFlyStemProliferation module = new PottsModuleFlyStemProliferation (stemCell );
1382+ boolean wtResult = module .daughterStem (stemLoc , daughterLoc , mock (Plane .class ), 1.0 , 4.0 );
1383+ assertTrue (wtResult , "WT: Expected true since prospero/deadpan (0.25) <= tfRatio (2.0)" );
13831384
1384- boolean result = module .daughterStem (stemLoc , daughterLoc , mock (Plane .class ), 1.0 , 4.0 );
1385-
1386- assertTrue (result , "Expected true since prospero/deadpan (0.25) <= tfRatio (2.0)" );
1385+ when (stemCell .getStemType ()).thenReturn (PottsCellFlyStem .StemType .MUDMUT );
1386+ module = new PottsModuleFlyStemProliferation (stemCell );
1387+ boolean mudResult = module .daughterStem (stemLoc , daughterLoc , mock (Plane .class ), 1.0 , 4.0 );
1388+ assertTrue (mudResult , "Mud: Expected true since prospero/deadpan (0.25) <= tfRatio (2.0)" );
13871389 }
13881390
13891391 @ Test
@@ -1393,13 +1395,15 @@ void testDaughterStem_RuleBased_TfRatioFalse() {
13931395 when (parameters .getString ("proliferation/DIFFERENTIATION_RULESET" )).thenReturn ("tfRatio" );
13941396 when (parameters .getDouble ("proliferation/TF_RATIO" )).thenReturn (2.0 );
13951397
1396- when (stemCell .getStemType ()).thenReturn (PottsCellFlyStem .StemType .MUDMUT );
1397-
1398+ when (stemCell .getStemType ()).thenReturn (PottsCellFlyStem .StemType .WT );
13981399 PottsModuleFlyStemProliferation module = new PottsModuleFlyStemProliferation (stemCell );
1400+ boolean wtResult = module .daughterStem (stemLoc , daughterLoc , mock (Plane .class ), 4.0 , 1.0 );
1401+ assertFalse (wtResult , "WT: Expected false since prospero/deadpan (4.0) > tfRatio (2.0)" );
13991402
1400- boolean result = module .daughterStem (stemLoc , daughterLoc , mock (Plane .class ), 4.0 , 1.0 );
1401-
1402- assertFalse (result , "Expected false since prospero/deadpan (4.0) > tfRatio (2.0)" );
1403+ when (stemCell .getStemType ()).thenReturn (PottsCellFlyStem .StemType .MUDMUT );
1404+ module = new PottsModuleFlyStemProliferation (stemCell );
1405+ boolean mudResult = module .daughterStem (stemLoc , daughterLoc , mock (Plane .class ), 4.0 , 1.0 );
1406+ assertFalse (mudResult , "Mud: Expected false since prospero/deadpan (4.0) > tfRatio (2.0)" );
14031407 }
14041408
14051409 @ Test
@@ -1413,8 +1417,8 @@ void testDaughterStem_TfRatioZeroDeadpanZeroProspero_returnsTrue() {
14131417
14141418 PottsModuleFlyStemProliferation module = new PottsModuleFlyStemProliferation (stemCell );
14151419
1416- boolean result = module .daughterStem (stemLoc , daughterLoc , mock (Plane .class ), 0.0 , 0.0 );
1420+ boolean result = ! module .daughterStem (stemLoc , daughterLoc , mock (Plane .class ), 0.0 , 0.0 );
14171421
1418- assertTrue (result , "Expected true when both prospero and deadpan are zero" );
1422+ assertTrue (result , "Expected false when both prospero and deadpan are zero" );
14191423 }
14201424}
0 commit comments