Exemplo n.º 1
0
        public void StartConnectionDirectiveSerializesCorrectly()
        {
            var task = new PrintPdfV1
            {
                Title       = "title",
                Description = "description",
                Url         = "http://www.example.com/flywheel.pdf",
                Context     = new ConnectionTaskContext {
                    ProviderId = "your-provider-skill-id"
                }
            };

            Utility.CompareJson(task.ToConnectionDirective("none"), "PrintPDFConnection.json");
        }
Exemplo n.º 2
0
        public void PrintPDFConnectionComparison()
        {
            var directive = new PrintPdfV1
            {
                Title       = "title",
                Description = "description",
                Url         = "http://www.example.com/flywheel.pdf",
                Context     = new ConnectionTaskContext {
                    ProviderId = "your-provider-skill-id"
                }
            }.ToConnectionDirective("none");

            Assert.Equal(PrintPdfV1.AssociatedUri, directive.Uri);
            Assert.True(Utility.CompareJson(directive, "PrintPDFConnection.json"));
            Assert.IsType <PrintPdfV1>(Utility.ExampleFileContent <StartConnectionDirective>("PrintPDFConnection.json").Input);
        }