예제 #1
0
        internal async Task <List <RequestResponse> > SetColor(Color color)
        {
            var chromaInstance = await chromaApp.Instance().ConfigureAwait(false);

            chromaInstance.SetAll(color);
            return(await chromaInstance.Send().ConfigureAwait(false));
        }
예제 #2
0
        public async Task <ActionResult> All(string hexColor)
        {
            var instance = await chromaApp.Instance();

            var color = new Color(hexColor);

            instance.SetAll(color);
            await instance.Send();

            return(Ok(true));
        }
예제 #3
0
        public async void Instance_ReturnValidInstance()
        {
            var app      = new ChromaApp(title: "Chroma Test App", description: "App for Tests");
            var instance = await app.Instance();

            Assert.NotNull(instance);

            instance.SetAll(Color.Red);
            var result = await instance.Send();

            Assert.All(result, x => Assert.Contains(x.Response, TestBase.VALID_RESULT));
        }