public async Task ThemableLottieVisualSource_ValueSet_AfterLoading() { var reference = new ThemableLottieVisualSource(); await reference.LoadForTests(GetStream(), "cache-key", (x, y) => { }); var sut = new ThemableLottieVisualSource(); var results = new List <string>(); await sut.LoadForTests(GetStream(), "cache-key", Callback); void Callback(string animationjson, string cachekey) { results.Add(animationjson); } results.Should().HaveCount(1); var color = Color.FromArgb(1, 2, 3, 4); sut.SetColorThemeProperty("Foreground", color); sut.GetColorThemeProperty("Foreground").Should().Be(color); results.Should().HaveCount(2); var jsonReference = reference.GetJson(); sut.GetJson().Should().NotBe(jsonReference); sut.GetColorThemeProperty("Foreground").Should().Be(color); }
public async Task ThemableLottieVisualSource_SimpleLoading() { var sut = new ThemableLottieVisualSource(); var results = new List <string>(); await sut.LoadForTests(GetStream(), "cache-key", Callback); void Callback(string animationjson, string cachekey) { results.Add(animationjson); } results.Should().HaveCount(1); }