private void OnEnable() { // Load UI SetupUI(); worldSelector.UpdateWorldSelection(); SelectTab(selectedTabType); }
public void WorldSelector_OnWorldChanged_not_called_if_no_change() { using (MockWorld.Create(new MockWorld.Options())) { var element = new WorldSelector(); element.UpdateWorldSelection(); var changed = false; element.OnWorldChanged += world => changed = true; element.UpdateWorldSelection(); Assert.IsFalse(changed); } }
public void WorldSelector_ActiveWorld_will_have_null_if_no_worlds() { var element = new WorldSelector(); element.UpdateWorldSelection(); Assert.IsNull(element.ActiveWorld); }
public void WorldSelector_ActiveWorld_will_have_null_if_no_spatial_worlds() { using (new World("some-world")) { var element = new WorldSelector(); element.UpdateWorldSelection(); Assert.IsNull(element.ActiveWorld); } }
public void WorldSelector_ActiveWorld_will_be_non_null_if_spatial_worlds() { using (var mockWorld = MockWorld.Create(new MockWorld.Options())) { var element = new WorldSelector(); element.UpdateWorldSelection(); Assert.IsNotNull(element.ActiveWorld); Assert.AreEqual(mockWorld.Worker.World, element.ActiveWorld); } }
private void OnEnable() { SetupUI(); worldSelector.UpdateWorldSelection(); }