private void Initialize(Type classType, string xapFileName) { // Store values. type = classType; InitializeNames( type.FullName, ReflectionUtil.GetAssemblyName(type.Assembly.FullName), xapFileName); // Retrieve the attribute. attribute = type.GetCustomAttributes(typeof(ViewTestClassAttribute), false).FirstOrDefault() as ViewTestClassAttribute; if (attribute == null) throw new ArgumentException(string.Format("Class not decorated with the [{0}] attribute.", typeof(ViewTestClassAttribute).Name)); // Finish up. IsActivated = true; }
public void ShouldNotShowPropertyExplorer() { var attr = new ViewTestClassAttribute{IsPropertyExplorerVisible = false}; attr.IsPropertyExplorerVisible.ShouldBe(false); }
public void ShouldShowPropertyExplorerByDefault() { var attr = new ViewTestClassAttribute(); attr.IsPropertyExplorerVisible.ShouldBe(true); }