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

Waffle / waffle / 6364

01 Feb 2026 02:07AM UTC coverage: 46.217%. Remained the same
6364

push

github

web-flow
Merge pull request #3206 from Waffle/renovate/checkstyle.version

Update dependency com.puppycrawl.tools:checkstyle to v13.1.0

276 of 734 branches covered (37.6%)

Branch coverage included in aggregate %.

1019 of 2068 relevant lines covered (49.27%)

1.0 hits per line

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

82.35
/Source/JNA/waffle-tests/src/main/java/waffle/mock/MockWindowsAccount.java
1
/*
2
 * SPDX-License-Identifier: MIT
3
 * See LICENSE file for details.
4
 *
5
 * Copyright 2010-2026 The Waffle Project Contributors: https://github.com/Waffle/waffle/graphs/contributors
6
 */
7
package waffle.mock;
8

9
import waffle.windows.auth.IWindowsAccount;
10

11
/**
12
 * The Class MockWindowsAccount.
13
 */
14
public class MockWindowsAccount implements IWindowsAccount {
15

16
    /** The Constant TEST_USER_NAME. */
17
    public static final String TEST_USER_NAME = "WaffleTestUser";
18

19
    /** The Constant TEST_PASSWORD. */
20
    public static final String TEST_PASSWORD = "!WAFFLEP$$Wrd0";
21

22
    /** The fqn. */
23
    private final String fqn;
24

25
    /** The name. */
26
    private String name;
27

28
    /** The domain. */
29
    private String domain;
30

31
    /** The sid. */
32
    private final String sid;
33

34
    /**
35
     * Instantiates a new mock windows account.
36
     *
37
     * @param newFqn
38
     *            the new fqn
39
     */
40
    public MockWindowsAccount(final String newFqn) {
41
        this(newFqn, "S-" + newFqn.hashCode());
2✔
42
    }
2✔
43

44
    /**
45
     * Instantiates a new mock windows account.
46
     *
47
     * @param newFqn
48
     *            the new fqn
49
     * @param newSid
50
     *            the new sid
51
     */
52
    public MockWindowsAccount(final String newFqn, final String newSid) {
2✔
53
        this.fqn = newFqn;
2✔
54
        this.sid = newSid;
2✔
55
        final String[] userNameDomain = newFqn.split("\\\\", 2);
2✔
56
        if (userNameDomain.length == 2) {
2!
57
            this.name = userNameDomain[1];
×
58
            this.domain = userNameDomain[0];
×
59
        } else {
60
            this.name = newFqn;
2✔
61
        }
62
    }
2✔
63

64
    @Override
65
    public String getDomain() {
66
        return this.domain;
2✔
67
    }
68

69
    @Override
70
    public String getFqn() {
71
        return this.fqn;
2✔
72
    }
73

74
    @Override
75
    public String getName() {
76
        return this.name;
2✔
77
    }
78

79
    @Override
80
    public String getSidString() {
81
        return this.sid;
2✔
82
    }
83

84
}
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

© 2026 Coveralls, Inc