File tree Expand file tree Collapse file tree 4 files changed +8
-22
lines changed
Assets/FluidBehaviorTree/Tests/Editor/Decorators Expand file tree Collapse file tree 4 files changed +8
-22
lines changed Original file line number Diff line number Diff line change 1- using CleverCrow . Fluid . BTs . Decorators ;
1+ using CleverCrow . Fluid . BTs . Decorators ;
22using CleverCrow . Fluid . BTs . Tasks ;
33using NSubstitute ;
44using NUnit . Framework ;
@@ -50,6 +50,13 @@ public void It_should_return_failure_if_a_child_is_missing () {
5050 _decorator . Children . RemoveAt ( 0 ) ;
5151 Assert . AreEqual ( TaskStatus . Failure , _decorator . Update ( ) ) ;
5252 }
53+
54+ [ Test ]
55+ public void Does_not_crash_if_no_child ( ) {
56+ _decorator . Children . RemoveAt ( 0 ) ;
57+
58+ Assert . DoesNotThrow ( ( ) => _decorator . Update ( ) ) ;
59+ }
5360 }
5461
5562 public class EndMethod : DecoratorTest {
Original file line number Diff line number Diff line change @@ -28,13 +28,6 @@ public void Returns_continue_on_child_continue () {
2828
2929 Assert . AreEqual ( TaskStatus . Continue , repeater . Update ( ) ) ;
3030 }
31-
32- [ Test ]
33- public void Does_not_crash_if_no_child ( ) {
34- var repeater = new RepeatForever ( ) ;
35-
36- Assert . DoesNotThrow ( ( ) => repeater . Update ( ) ) ;
37- }
3831 }
3932 }
4033}
Original file line number Diff line number Diff line change @@ -28,13 +28,6 @@ public void Returns_continue_on_child_continue () {
2828
2929 Assert . AreEqual ( TaskStatus . Continue , repeater . Update ( ) ) ;
3030 }
31-
32- [ Test ]
33- public void Does_not_crash_if_no_child ( ) {
34- var repeater = new RepeatUntilFailure ( ) ;
35-
36- Assert . DoesNotThrow ( ( ) => repeater . Update ( ) ) ;
37- }
3831 }
3932 }
4033}
Original file line number Diff line number Diff line change @@ -28,13 +28,6 @@ public void Returns_continue_on_child_continue () {
2828
2929 Assert . AreEqual ( TaskStatus . Continue , repeater . Update ( ) ) ;
3030 }
31-
32- [ Test ]
33- public void Does_not_crash_if_no_child ( ) {
34- var repeater = new RepeatUntilSuccess ( ) ;
35-
36- Assert . DoesNotThrow ( ( ) => repeater . Update ( ) ) ;
37- }
3831 }
3932 }
4033}
You can’t perform that action at this time.
0 commit comments