コード例 #1
0
        // This method gets called by the runtime. Use this method to add services to the container.
        public void ConfigureServices(IServiceCollection services)
        {
            // Add framework services.
            services.AddMvc();

            var chromaApp = new ChromaApp(title: "Chroma Server Test App", description: "Chroma Test App for .Net Core server", author: "sdc4");

            services.AddSingleton(chromaApp);
        }
コード例 #2
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));
        }
コード例 #3
0
 internal void Init()
 {
     chromaApp = new ChromaApp(title: "Chroma WinForms Test App",
                               description: "Chroma Test App for Windows Forms", author: "sdc4");
 }
コード例 #4
0
 public ChromaController(ChromaApp chromaApp)
 {
     this.chromaApp = chromaApp;
 }