public void CreateWithValidCmdApplicationConfigurationReturnsExpected(
     string friendlyName,
     CmdApplicationConfigurationViewModelFactory sut)
 {
     var meta = TestCmdApplicationMeta.Application;
     var configuration = CreateCmdApplicationConfiguration(friendlyName, meta);
     var actual = sut.Create(configuration, meta);
     Assert.Equal(friendlyName, actual.FriendlyName);
     Assert.Equal(meta.ApplicationName, actual.ApplicationName);
 }
        public void CreateWithValidParametersReturnsViewModel(
            Name name,
            Name anotherName,
            IChannel<SaveCmdApplicationConfigurationCommand> channel,
            CmdApplicationConfigurationViewModelFactory sut)
        {
            var viewModel = sut.Create(TestCmdApplicationMeta.Application);
            Assert.Equal(TestCmdApplicationMeta.Application.ApplicationName, viewModel.ApplicationName);
            foreach (var meta in TestCmdApplicationMeta.Application.ParameterMetas)
            {
                viewModel.Properties.Any(a => a.GetParameterType() == meta.ParameterType);
            }

        }
 public void CreateWithInvalidParameterMetaTypeThrowsException(
     Name name,
     Name applicationName,
     Name parameterName,
     IChannel<SaveCmdApplicationConfigurationCommand> channel,
     CmdApplicationConfigurationViewModelFactory sut)
 {
     var parameter = new Mock<IParameter>();
     var meta = new CmdApplicationMeta(
         name,
         applicationName,
         new List<ParameterMeta>()
         {
             ParameterMeta.Create<IParameter>(parameterName)
         });
     Assert.Throws<ArgumentException>(() => sut.Create(meta));
 }
 public void CreateThrowsExcpetionForNullParameters(CmdApplicationConfigurationViewModelFactory factory)
 {
     CmdApplicationMeta NullMeta = null;
     Assert.Throws<ArgumentNullException>(() => factory.Create(NullMeta));
 }