• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

luttje / Key2Joy / 6557152774

18 Oct 2023 06:36AM UTC coverage: 52.519% (+39.8%) from 12.718%
6557152774

push

github

web-flow
Adding more tests, fixing bugs in the process (#48)

* Add config manager tests

* legacy config and mapping profile tests (should fix #42)

* remove comment, problem was caused by transfer across appdomain (or to/fro scripting environment)

* Test core functionality #48 + includes minor refactoring to be able to test + added docs

* Add interop tests + implement and test async test utility (refactors away from singletons)

* fix not all tests running in workflow

* config and interop tests

* Refactor and allow mocking global input hook class

* add capture action test

* Make Execute override optional for script only methods

* add dependency injection + refactor and try test gamepad service

* Refactor config singleton to using dependency injection

* add tests for scripting

* add tests for plugin set + fix plugin showing as loaded even if checksum match failed

* fix tests failing because it relied on config exist (I guess the test order was accidentally correct earlier, this means we should really fix cleanup so we catch this sooner)

* refactor docs code + fix wrong enum summary

* refactor docs builder and start testing it a bit

* fix cmd project structure

* ignore designer files in tests

* cleanup and refactor UI code + show latest version in help

* truncate listview action column

* allow user config to minimize app when pressing X (defaults to shut down app) resolves #45

696 of 1757 branches covered (0.0%)

Branch coverage included in aggregate %.

4597 of 4597 new or added lines in 138 files covered. (100.0%)

3619 of 6459 relevant lines covered (56.03%)

17089.01 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

91.3
/Support/BuildMarkdownDocs/Members/Example.cs
1
using System.Collections.Generic;
2
using System.Xml.Linq;
3
using BuildMarkdownDocs.Util;
4

5
namespace BuildMarkdownDocs.Members;
6

7
internal class Example
8
{
9
    public List<string> TextContent { get; set; }
85✔
10

11
    public Example() => this.TextContent = new List<string>();
42✔
12

13
    internal static Example FromXml(XElement element)
14
    {
15
        Example example = new();
21✔
16
        var children = element.Nodes();
21✔
17

18
        foreach (var child in children)
128✔
19
        {
20
            var value = "";
43✔
21

22
            if (child is XText textChild)
43✔
23
            {
24
                value = textChild.Value.Trim().TrimEachLine().TrimEndEachLine();
21✔
25
            }
26
            else if (child is XElement elementChild)
22✔
27
            {
28
                if (elementChild.Name.LocalName == "code")
22!
29
                {
30
                    value = CodeBlock.FromXml(elementChild).ToString();
22✔
31
                }
32
                else
33
                {
34
                    value = elementChild.Value.Trim();
×
35
                }
36
            }
37

38
            example.TextContent.AddRange(value.TrimEndEachLine().Split('\n'));
43✔
39
        }
40

41
        return example;
21✔
42
    }
43

44
    public override string ToString() => "> " + string.Join("\n> ", this.TextContent) + "\n---";
21✔
45
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc