Skip to content

Instantly share code, notes, and snippets.

@Enigo
Last active May 15, 2022 03:53
Show Gist options
  • Save Enigo/d6ed9f7168854317576e3301c6cafe5c to your computer and use it in GitHub Desktop.
Save Enigo/d6ed9f7168854317576e3301c6cafe5c to your computer and use it in GitHub Desktop.
public class LetterControlTest
{
...
[UnityTest]
public IEnumerator WhenChangeColorControlToGreenThenItIsChanged()
{
var colorToChange = ColorCollection.Green;
_letterControl.ChangeColorControl(colorToChange);
yield return new WaitForSeconds(0.15f * 11f);
Assert.True(Mathf.Approximately(colorToChange.r, _image.color.r));
Assert.True(Mathf.Approximately(colorToChange.g, _image.color.g));
Assert.True(Mathf.Approximately(colorToChange.b, _image.color.b));
Assert.True(Mathf.Approximately(colorToChange.a, _image.color.a));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment