Ejemplo n.º 1
0
        public void SetUpCompositeInformationProperly()
        {
            var cvm = new ComponentViewModel();
            var cm  = new ComponentModel();
            var mvm = new MainViewModel {
                ComponentViewModel = cvm, ComponentModel = cm
            };
            var cv = new ComponentView();

            // ReSharper disable once UnusedVariable => variable needed to correctly create the connector that will set up the MVVM components.
            var conn = new TConnector(cv, mvm, ComponentViewModel, ComponentModel);

            Assert.AreSame(cm, cvm.Model);
            Assert.AreSame(cvm, cv.GetViewModel());
        }