Exemple #1
0
        public void CommandViewModel_Return_ToString_Correctly()
        {
            CommandModel     cm  = new GenericCommandModel("Test", new SimpleCommand());
            CommandViewModel cvm = new CommandViewModel(cm);

            Assert.AreNotEqual(cvm.ToString(), typeof(CommandViewModel).ToString());
            Console.WriteLine(cvm.ToString());
        }
 public override string ToString()
 {
     if (EmbeddedModel is GenericCommandModel)
     {
         GenericCommandModel gcm = EmbeddedModel as GenericCommandModel;
         return(String.Format("{0} - {1}", gcm.Header, gcm.Command.GetHashCode()));
     }
     else
     {
         return(base.ToString());
     }
 }