public void WithParameterWithDiffParameterNameDoesNotSetIsSelected( NameOnlyParameter parameter, NameOnlyParameterViewModel sut) { Assert.NotEqual(parameter.Name, sut.Name); sut.WithParameter(parameter); Assert.False(sut.IsSelected); }
public override Maybe<IParameter> GetParameter() { if (!this.IsSelected) return Maybe.Empty<IParameter>(); var parameter = new NameOnlyParameter(this.Name); return Maybe.ToMaybe<IParameter>(parameter); }
public void WithParameterWithSameParameterNameSetsIsSelected( [Frozen]Name name, NameOnlyParameter parameter, NameOnlyParameterViewModel sut) { Assert.Equal(parameter.Name, sut.Name); sut.WithParameter(parameter); Assert.True(sut.IsSelected); }
private CmdApplicationConfiguration CreateCmdApplicationConfiguration( string friendlyName, CmdApplicationMeta meta) { var parameterList = new List<IParameter>(); IParameter parameter = new NameOnlyParameter((Name)"-E"); parameterList.Add(parameter); parameter = new NameValueParameter((Name)"-S", "Value"); parameterList.Add(parameter); var configuration = new CmdApplicationConfiguration( (Name)friendlyName, (Name)meta.ApplicationName, new ReadOnlyCollection<IParameter>(parameterList)); return configuration; }