Class StubModalComponent
The Unity-lifetime counterpart of UnityModalServiceTests.StubModal: a modal that can actually be
destroyed, which is what a real modal is and what the plain C# stub can never be. Only a
UnityEngine.Object reaches the "destroyed but not null" state the close-modal guard exists
for, so this is the fixture that pins UnityObjectUtils.IsAlive against a plain == null
check. Lives in its own file because Unity binds a MonoBehaviour script by file name.
Inheritance
StubModalComponent
Assembly: Tests.dll
Syntax
public class StubModalComponent : MonoBehaviour, IUiModal, IComponent, IFoundationSettings
Constructors
StubModalComponent()
Declaration
public StubModalComponent()
Properties
Guid
Declaration
public string Guid { get; set; }
Property Value
Id
Declaration
public string Id { get; set; }
Property Value
ModalParameters
Declaration
public IUiModalParameters ModalParameters { get; set; }
Property Value
WasAskedToDestroyItself
Declaration
public bool WasAskedToDestroyItself { get; }
Property Value
| Type |
Description |
| bool |
True once the close coroutine asked this modal to destroy itself — the first thing that
coroutine does, so a false here proves the handler returned before starting it at all.
|
Methods
DestroyModal()
Declaration
public IEnumerator DestroyModal()
Returns
ExecuteChangeOptionValue(UiOptionValue)
Declaration
public void ExecuteChangeOptionValue(UiOptionValue optionValue)
Parameters
ExecuteSelectOption()
Declaration
public void ExecuteSelectOption()
GetOptionByIndex(int)
Declaration
public IUiInteractable GetOptionByIndex(int index)
Parameters
| Type |
Name |
Description |
| int |
index |
|
Returns
GetSelectedOption()
Declaration
public IUiInteractable GetSelectedOption()
Returns
GetSelectedOptionIndex()
Declaration
public int GetSelectedOptionIndex()
Returns
OnDraggingEnd()
Declaration
public void OnDraggingEnd()
OnDraggingStart()
Declaration
public void OnDraggingStart()
SelectNextOption()
Declaration
public void SelectNextOption()
SelectPreviousOption()
Declaration
public void SelectPreviousOption()
SetNextOptionValue()
Declaration
public void SetNextOptionValue()
SetPreviousOptionValue()
Declaration
public void SetPreviousOptionValue()
Implements