Ejemplo n.º 1
0
        public void ToString_ReturnsReadableOutput()
        {
            var employeeVM = CreateEmployeeVM(
                b => b
                .OnChangeOf
                .Self
                .OrAnyDescendant
                .Refresh
                .Descendant(x => x.Projects)
                .Descendant(x => x.Customer)
                .Properties(x => x.Name, x => x.Rating)
                );

            var behavior = employeeVM
                           .Descriptor
                           .Behaviors
                           .GetNextBehavior <DeclarativeDependencyBehavior>();

            DeclarativeDependency dp = behavior.Dependencies.Single();

            string expected =
                "On change of 'EmployeeVMDescriptor.[anything]?' refresh 'EmployeeVMDescriptor.Projects.Customer.[Name, Rating]'";

            Assert.AreEqual(expected, dp.ToString());
        }
Ejemplo n.º 2
0
 public abstract void Execute(
     IViewModel ownerVM,
     ChangeArgs args,
     DeclarativeDependency dependency
     );
Ejemplo n.º 3
0
 public DeclarativeRefreshEntry(DeclarativeDependency dependency)
 {
     Dependency = dependency;
 }
Ejemplo n.º 4
0
 internal static void BeginRefresh(DeclarativeDependency refreshDependency)
 {
     BeginEntry(new DeclarativeRefreshEntry(refreshDependency));
 }