public IEnumerator UpdateColors_Should_NotHaveAnyEffect_When_NoChildreCouldBeFound() { ScriptUnderTest.UpdateColors(GameObjectUnderTest.transform, TableStyle); Assert.Pass(); yield return(null); }
public IEnumerator UpdateColors_Should_NotHaveAnyEffect_When_NoImagesWereAttachedToChildren() { AddChildrenToDummyGameObject(); ScriptUnderTest.UpdateColors(GameObjectUnderTest.transform, TableStyle); Assert.Pass(); yield return(null); }
public IEnumerator UpdateColors_Should_ThrowNullReferenceException_When_TableStyleWasNull() { Assert.Throws <NullReferenceException>(() => { ScriptUnderTest.UpdateColors(GameObjectUnderTest.transform, null); } ); yield return(null); }
public IEnumerator UpdateColors_Should_ChangeImageColors_When_ImagesWereAttachedToChildren() { var child = AddChildrenToDummyGameObject(); var image = child.AddComponent <Image>(); image.color = Color.gray; ScriptUnderTest.UpdateColors(GameObjectUnderTest.transform, TableStyle); var expected = TableStyle.Colors[0]; Assert.AreEqual(image.color, expected); yield return(null); }