Exemple #1
0
        public void Describe(Description description)
        {
            description.Title = Spec.Name;
            description.ShortDescription = "Version " + _version;

            description.AddList("Dependencies", _dependencies);
        }
        public static void Add(string name, Action<Description> configure)
        {
            var description = new Description();
            configure(description);

            _bag[name] = description;
        }
        public void SetUp()
        {
            theType = typeof (ValidatedClass);
            theRule = new SelfValidatingClassRule(theType);

            theDescription = Description.For(theRule);
        }
Exemple #4
0
 void DescribesItself.Describe(Description description)
 {
     description.Title = "Chrome / " + _contentType.Name;
     description.ShortDescription =
         "Applies 'chrome' html around the inner behavior's output by executing the chain representing the {0} model"
             .ToFormat(_contentType.Name);
 }
        public void Describe(Description description)
        {
            description.Title = "Create Packages for " + _solution.Name;
            description.ShortDescription = "Version " + _version;

            description.AddList("Nuspecs", _plans);
        }
 public void Describe(Description description)
 {
     description.Title = "Wrote file " + LocalFilePath;
     description.Properties["ContentType"] = ContentType;
     description.Properties["LocalFilePath"] = LocalFilePath;
     description.Properties["DisplayName"] = DisplayName;
 }
Exemple #7
0
        public void Describe(Description description)
        {
            description.ShortDescription = "Problems were found for " + _solution.Name;

            var list = description.AddList("Problems", _problems);
            list.Label = "Problems";
        }
 public void describes_itself()
 {
     var handler = new RespondWithMessageHandler<Exception>(null);
     var description = new Description();
     handler.Describe(description);
     description.Title.ShouldNotBeNull();
 }
 public void Describe(Description description)
 {
     description.ShortDescription = "Governs the behavior and verbosity of the runtime diagnostics";
     description.Properties["Tracing Level"] = TraceLevel.ToString();
     description.Properties["Maximum Number of Requests to Keep"] = MaxRequests.ToString();
     description.AddList("Authorization Rules for Diagnostics", AuthorizationRights);
 }
 public void Describe(Description description)
 {
     description.Title = "Stateful Saga Node";
     description.ShortDescription = "Applies saga state loading and persistence within this chain";
     description.Properties["State Type"] = StateType.FullName;
     description.Properties["Message Type"] = MessageType.FullName;
     description.AddChild("Repository", Repository);
 }
        public void Describe(Description description)
        {
            description.ShortDescription = "Lightning Queues Configuration";

            description.Properties[nameof(DefaultPort)] = DefaultPort.ToString();
            description.Properties[nameof(MaxDatabases)] = MaxDatabases.ToString();
            description.Properties[nameof(MapSize)] = MapSize.ToString();
        }
        protected override void createDescription(Description description)
        {
            description.ShortDescription = _token.Namespace.IsNotEmpty()
                ? "View {0}.{1}, Condition {2}".ToFormat(_token.Namespace, _token.Name(), ConditionType.Name)
                : ToString();

            description.Title = "View " + _token.Name();
        }
Exemple #13
0
        public void Describe(Description description)
        {
            description.Title = "Project \"{0}\"".ToFormat(Name);
            description.ShortDescription = FilePath;

            var list = description.AddList("Dependencies", Dependencies);
            list.Label = "Dependencies";
        }
Exemple #14
0
        void DescribesItself.Describe(Description description)
        {
            description.Title = _accessor.ToString();

            if (DefaultValue != null)
            {
                description.Properties["DefaultValue"] = DefaultValue.ToString();
            }
        }
Exemple #15
0
        public void Describe(Description description)
        {
            description.Title = Name;
            description.ShortDescription = Description;

            if (Url.IsNotEmpty())
            {
                description.Properties["Url"] = Url;
            }
        }
 public void Describe(Description description)
 {
     description.Properties[nameof(MinSeconds)] = MinSeconds.ToString();
     description.Properties[nameof(MaxSeconds)] = MaxSeconds.ToString();
     description.Properties[nameof(TakeOwnershipMessageTimeout)] = TakeOwnershipMessageTimeout.ToString();
     description.Properties[nameof(HealthCheckMessageTimeout)] = HealthCheckMessageTimeout.ToString();
     description.Properties[nameof(DeactivationMessageTimeout)] = DeactivationMessageTimeout.ToString();
     description.Properties[nameof(TaskAvailabilityCheckTimeout)] = TaskAvailabilityCheckTimeout.ToString();
     description.Properties[nameof(TaskActivationTimeout)] = TaskActivationTimeout.ToString();
 }
Exemple #17
0
        public void Describe(Description description)
        {
            var exception = findException(Exception);
            if (exception != null)
            {
                description.Title = exception.GetType().Name;
            }

            description.ShortDescription = Message;
        }
 public DescriptionTextWriter(Description description)
 {
     if (!description.IsMultiLevel())
     {
         _report.AddText(description.ToString());
     }
     else
     {
         description.AcceptVisitor(this);
     }
 }
        public void Describe(Description description)
        {
            description.Title = "The described parent";
            description.Properties["Color"] = "Orange";
            description.Properties["Direction"] = "North";
            description.Properties["Name"] = "Max";

            description.AddChild("Child1 Something", new DescribedChild());
            description.AddChild("Child2 else", new DescribedChild());
            description.AddChild("Child3", new DescribedChild());
        }
Exemple #20
0
        public void Describe(Description description)
        {
            description.Title = "Selected writer '{0}'".ToFormat(_writer.Title);

            if (_writer.HasExplicitShortDescription())
            {
                description.Properties["Writer"] = _writer.ShortDescription;
            }
            
            description.Properties["Mimetype"] = _mimeType;
        }
        public void Describe(Description description)
        {
            description.Title = "Missing Nugets";
            description.ShortDescription = "Could not find nugets";
            description.AddList("Nugets", _nugets);

            if (_problems.Any())
            {
                description.AddList("Problems", _problems);
            }
        }
 public DescriptionTextWriter(Description description)
 {
     if (description.IsMultiLevel())
     {
         description.AcceptVisitor(this);
     }
     else
     {
         this.As<IDescriptionVisitor>().Start(description);
     }
 }
Exemple #23
0
        private void addDescriptionText(Description description)
        {
            if (description.HasExplicitShortDescription())
            {
                Add("p").AddClass("short-desc").Text(description.ShortDescription);
            }

            if (description.LongDescription.IsNotEmpty())
            {
                Add("p").AddClass("long-desc").Text(description.LongDescription);
            }
        }
 void IDescriptionVisitor.Start(Description description)
 {
     if (_level == 0)
     {
         _report.AddDivider('=');
         _report.AddText(description.ToString());
         _report.AddDivider('=');
     }
     else
     {
         _report.AddColumnData(_prefixes.Peek().GetPrefix() + description.Title, description.ShortDescription);
     }
 }
Exemple #25
0
        public void Describe(Description description)
        {
            description.Title = "Package '{0}'".ToFormat(Name);
            description.Properties["Role"] = Role;

            description.Properties["Assemblies"] = Manifest.Assemblies.Join(", ");

            if (Manifest.BinPath != null) description.Properties["BinPath"] = Manifest.BinPath;

            if (Manifest.ContentFileSet != null) description.Properties["Content Files"] = Manifest.ContentFileSet.ToString();

            if (Dependencies != null && Dependencies.Any()) description.AddList("Dependencies", Dependencies);
        }
Exemple #26
0
        public DescriptionBodyTag(Description description)
            : base("div")
        {
            AddClass("description-body");

            addDescriptionText(description);

            writeProperties(description);

            writeChildren(description);

            description.BulletLists.Each(writeBulletList);
        }
Exemple #27
0
        public ChildDescriptionTag(string name, Description child)
            : base("div")
        {
            AddClass("desc-child");

            Add("div", title =>
            {
                title.AddClass("desc-child-title");
                title.Add("b").Text(name);
                title.Add("i").Text(child.Title);
            });

            Add("div").AddClass("desc-child-body").Append(new DescriptionBodyTag(child));
        }
        public void Describe(Description description)
        {
            description.Title = _solution.Name;

            if (IsValid())
            {
                description.ShortDescription = "No problems found";
                return;
            }

            description.ShortDescription = "Problems were found for " + _solution.Name;

            var list = description.AddList("Problems", _problems);
            list.Label = "Problems";
        }
Exemple #29
0
        public void Describe(Description description)
        {
            description.Title = _conditions.Any() 
                ? _conditions.Select(x => Description.For(x).Title).Join(" and ") 
                : "Always";

            if (_sources.Count > 1)
            {
                description.AddList("Continuations", _sources);
            }
            else if (_sources.Count == 1)
            {
                description.ShortDescription = Description.For(_sources.Single()).ShortDescription;
            }
        }
        public void Describe(Description description)
        {
            description.Title = "Dependency Validation";

            if (IsValid())
            {
                description.ShortDescription = "No problems detected";
                return;
            }

            description.ShortDescription = "Problems were detected";

            var list = description.AddList("Problems", _problems);
            list.Label = "Problems";
        }