public void TestNonJsonAssetFile()
        {
            LottieResult <LottieComposition> result = LottieCompositionFactory.FromAssetSync(null, "not_json.txt");

            Assert.NotNull(result.Exception);
            Assert.Null(result.Value);
        }
        public void TestLoadInvalidAssetName()
        {
            LottieResult <LottieComposition> result = LottieCompositionFactory.FromAssetSync(null, "square2.json");

            Assert.Equal(typeof(FileNotFoundException), result.Exception.GetType());
            Assert.Null(result.Value);
        }
Ejemplo n.º 3
0
 public static LottieComposition FromFileSync(string fileName)
 {
     return(LottieCompositionFactory.FromAssetSync(null, fileName).Value);
 }