Exemplo n.º 1
0
        /// <inheritdoc />
        public override Result <Unit, IError> VerifyThis(SCLSettings settings)
        {
            var r = SettingsHelpers.TryGetNuixSettings(
                ConnectorSettings.CreateFromSCLSettings(settings).Select(x => x.Settings)
                )
                    .Bind(NuixConnectionHelper.TryGetConsoleArguments)
                    .MapError(x => x.WithLocation(this));

            if (r.IsFailure)
            {
                return(r.ConvertFailure <Unit>());
            }

            return(base.VerifyThis(settings));
        }
Exemplo n.º 2
0
        public void TestGettingConnectorSettingsFromString()
        {
            var settings = SCLSettings.CreateFromString(ConnectorJson);

            var connectorSettings = ConnectorSettings.CreateFromSCLSettings(settings).ToList();

            connectorSettings.Should().HaveCount(1);

            var nuixSettings = connectorSettings.Single().Settings;

            nuixSettings.Id.Should().Be("Reductech.EDR.Nuix");
            nuixSettings.Version.Should().Be("0.9.0");
            nuixSettings.Enable.Should().Be(true);

            nuixSettings.Settings.TryGetNestedBool("UseDongle").Should().BeTrue();
        }