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

openmrs / openmrs-core / 15462307321

05 Jun 2025 08:30AM UTC coverage: 63.633% (-0.2%) from 63.8%
15462307321

push

github

rkorytkowski
TRUNK-6345 Fix testing framework to be used by modules for openmrs-core 2.4+

(cherry picked from commit 202eb8b65)
(cherry picked from commit bfb74a2d0)

4 of 9 new or added lines in 2 files covered. (44.44%)

54 existing lines in 14 files now uncovered.

21804 of 34265 relevant lines covered (63.63%)

0.64 hits per line

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

88.89
/api/src/main/java/org/openmrs/layout/name/NameSupport.java
1
/**
2
 * This Source Code Form is subject to the terms of the Mozilla Public License,
3
 * v. 2.0. If a copy of the MPL was not distributed with this file, You can
4
 * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under
5
 * the terms of the Healthcare Disclaimer located at http://openmrs.org/license.
6
 *
7
 * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS
8
 * graphic logo is a trademark of OpenMRS Inc.
9
 */
10
package org.openmrs.layout.name;
11

12
import org.openmrs.api.APIException;
13
import org.openmrs.api.context.Context;
14
import org.openmrs.layout.LayoutSupport;
15

16
/**
17
 * @since 1.12
18
 */
19
public class NameSupport extends LayoutSupport<NameTemplate> {
20
        
21
        private static NameSupport singleton;
22
        
23
        public NameSupport() {
1✔
24
                if (singleton == null) {
1✔
25
                        singleton = this;
1✔
26
                }
27
        }
1✔
28
        
29
        public static NameSupport getInstance() {
30
                if (singleton == null) {
1✔
UNCOV
31
                        throw new APIException("Not Yet Instantiated");
×
32
                } else {
33
                        return singleton;
1✔
34
                }
35
        }
36
        
37
        @Override
38
        public String getDefaultLayoutFormat() {
39
                String ret = Context.getAdministrationService().getGlobalProperty("layout.name.format");
1✔
40
                return (ret != null && ret.length() > 0) ? ret : defaultLayoutFormat;
1✔
41
        }
42
}
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