public CommandPublicationRecord(ICommand command)
 {
     Status          = CommandPublicationStatus.Unpublished;
     Id              = command.PublicationRecordId;
     PortableCommand = new PortableCommand(command, CommandSchemaGenerator.GenerateSchema(command.GetType()));
     Created         = DateTime.UtcNow;
     QueryReferences = new EditableList <IdentifierQueryReference>();
 }
Beispiel #2
0
        public void TestProjectToolIsAvailableThroughDriver(string appName)
        {
            var appDirectory = Path.Combine(_testProjectsRoot, appName);

            new BuildCommand(Path.Combine(appDirectory, "project.json"))
                .Execute()
                .Should()
                .Pass();

            CommandResult result = new PortableCommand { WorkingDirectory = appDirectory }
                .ExecuteWithCapturedOutput();

            result.Should().HaveStdOut("Hello Portable World!" + Environment.NewLine);
            result.Should().NotHaveStdErr();
            result.Should().Pass();
        }
Beispiel #3
0
        public void TestProjectToolIsAvailableThroughDriver(string appName)
        {
            var appDirectory = Path.Combine(_testProjectsRoot, appName);

            new BuildCommand(Path.Combine(appDirectory, "project.json"))
            .Execute()
            .Should()
            .Pass();

            CommandResult result = new PortableCommand {
                WorkingDirectory = appDirectory
            }
            .ExecuteWithCapturedOutput();

            result.Should().HaveStdOutContaining("Hello Portable World!" + Environment.NewLine);
            result.Should().NotHaveStdErr();
            result.Should().Pass();
        }
Beispiel #4
0
        public void TestProjectToolIsAvailableThroughDriver(string appName)
        {
            var testInstance = TestAssetsManager
                               .CreateTestInstance(appName, identifier: appName)
                               .WithLockFiles();

            var appDirectory = testInstance.Path;

            new BuildCommand(Path.Combine(appDirectory, "project.json"))
            .Execute()
            .Should()
            .Pass();

            CommandResult result = new PortableCommand {
                WorkingDirectory = appDirectory
            }
            .ExecuteWithCapturedOutput();

            result.Should().HaveStdOutContaining("Hello Portable World!" + Environment.NewLine);
            result.Should().NotHaveStdErr();
            result.Should().Pass();
        }