public void GetCommandsTest()
 {
     var extractor = new ReflectionViewModelMetadataExtractor();
     var commands = extractor.GetCommands(typeof(TestViewModel)).OrderBy(p => p.CommandName).ToList();
     Assert.AreEqual(2, commands.Count);
     Assert.AreEqual("JSMethod", commands[1].ClientFunctionName);
 }
 public void GetPropertiesTest()
 {
     var extractor = new ReflectionViewModelMetadataExtractor();
     var props = extractor.GetProperties(typeof (TestViewModel)).OrderBy(p => p.PropertyName).ToList();
     Assert.AreEqual(3, props.Count);
     Assert.AreEqual("1 * 2", props[2].ClientImplementation);
     Assert.IsTrue(props[2].IsReadOnly);
 }
 public void DependentTypesTest()
 {
     var extractor = new ReflectionViewModelMetadataExtractor();
     var types = extractor.GetDependentTypes(typeof (TestViewModel)).ToList();
     Assert.AreEqual(3, types.Count);
     Assert.IsTrue(types.Contains(typeof(A)));
     Assert.IsTrue(types.Contains(typeof(B)));
 }