[Test] public void WhenConvertibleObjectsSelected_ShouldBeAvailable() { var go = CreateGameObject(typeof(Mask), typeof(Image)); SelectObjects(go); Assert.IsTrue(ConvertMaskMenu.CanConvert()); }
void AssertObjectIsNotConvertible(params Type[] componentTypes) { var go = CreateGameObject(componentTypes); SelectObjects(go); Assert.IsFalse(ConvertMaskMenu.CanConvert()); }
[Test] public void WhenNotAllOfSelectedObjectsConvertible_ShouldBeNotAvailable() { var good = CreateGameObject(typeof(Mask), typeof(Image)); var bad = CreateGameObject(typeof(Mask), typeof(Text)); SelectObjects(good, bad); Assert.IsFalse(ConvertMaskMenu.CanConvert()); }
void SelectAndConvertObjects(params GameObject[] objects) { SelectObjects(objects); ConvertMaskMenu.Convert(); }
[Test] public void WhenNoObjectSelected_ShouldBeNotAvailable() { SelectObjects(); Assert.IsFalse(ConvertMaskMenu.CanConvert()); }