|
1
|
|
package com.github.dakusui.symfonion.song; |
|
2
|
|
|
|
3
|
|
import com.github.dakusui.symfonion.compat.json.JsonFormatException; |
|
4
|
|
import com.github.dakusui.symfonion.compat.json.JsonInvalidPathException; |
|
5
|
|
import com.github.dakusui.symfonion.compat.json.JsonTypeMismatchException; |
|
6
|
|
import com.github.dakusui.symfonion.compat.json.CompatJsonUtils; |
|
7
|
|
import com.github.dakusui.symfonion.compat.exceptions.SymfonionException; |
|
8
|
|
import com.google.gson.JsonObject; |
|
9
|
|
|
|
10
|
|
|
|
11
|
|
public class Part { |
|
12
|
|
int channel; |
|
13
|
|
private final String name; |
|
14
|
|
private final String portName; |
|
15
|
|
|
|
16
|
|
public Part(String name, JsonObject json) throws SymfonionException, JsonTypeMismatchException, JsonFormatException, JsonInvalidPathException { |
|
17
|
|
this.name = name; |
|
18
|
|
this.channel = CompatJsonUtils.asInt(json, Keyword.channel); |
|
19
|
|
this.portName = CompatJsonUtils.asStringWithDefault(json, null, Keyword.port); |
|
20
|
|
} |
|
21
|
|
|
|
22
|
|
public String name() { |
|
23
|
1
1. name : replaced return value with "" for com/github/dakusui/symfonion/song/Part::name → NO_COVERAGE
|
return this.name; |
|
24
|
|
} |
|
25
|
|
|
|
26
|
|
public int channel() { |
|
27
|
1
1. channel : replaced int return with 0 for com/github/dakusui/symfonion/song/Part::channel → SURVIVED
|
return this.channel; |
|
28
|
|
} |
|
29
|
|
|
|
30
|
|
public String portName() { |
|
31
|
1
1. portName : replaced return value with "" for com/github/dakusui/symfonion/song/Part::portName → KILLED
|
return this.portName; |
|
32
|
|
} |
|
33
|
|
} |
| | Mutations |
| 23 |
|
1.1 Location : name Killed by : none replaced return value with "" for com/github/dakusui/symfonion/song/Part::name → NO_COVERAGE
|
| 27 |
|
1.1 Location : channel Killed by : none replaced int return with 0 for com/github/dakusui/symfonion/song/Part::channel → SURVIVED
Covering tests
Covered by tests:
- com.github.dakusui.symfonion.tests.MidiCompilerTest.[engine:junit-jupiter]/[class:com.github.dakusui.symfonion.tests.MidiCompilerTest]/[test-template:exercise(com.github.dakusui.symfonion.testutils.SymfonionTestCase)]/[test-template-invocation:#4]
- com.github.dakusui.symfonion.tests.MidiCompilerTest.[engine:junit-jupiter]/[class:com.github.dakusui.symfonion.tests.MidiCompilerTest]/[test-template:exercise(com.github.dakusui.symfonion.testutils.SymfonionTestCase)]/[test-template-invocation:#8]
- com.github.dakusui.symfonion.tests.MidiCompilerTest.[engine:junit-jupiter]/[class:com.github.dakusui.symfonion.tests.MidiCompilerTest]/[test-template:exercise(com.github.dakusui.symfonion.testutils.SymfonionTestCase)]/[test-template-invocation:#13]
- com.github.dakusui.symfonion.tests.MidiCompilerTest.[engine:junit-jupiter]/[class:com.github.dakusui.symfonion.tests.MidiCompilerTest]/[test-template:exercise(com.github.dakusui.symfonion.testutils.SymfonionTestCase)]/[test-template-invocation:#10]
- com.github.dakusui.symfonion.tests.MidiCompilerTest.[engine:junit-jupiter]/[class:com.github.dakusui.symfonion.tests.MidiCompilerTest]/[test-template:exercise(com.github.dakusui.symfonion.testutils.SymfonionTestCase)]/[test-template-invocation:#9]
- com.github.dakusui.symfonion.tests.MidiCompilerTest.[engine:junit-jupiter]/[class:com.github.dakusui.symfonion.tests.MidiCompilerTest]/[test-template:exercise(com.github.dakusui.symfonion.testutils.SymfonionTestCase)]/[test-template-invocation:#11]
- com.github.dakusui.symfonion.tests.MidiCompilerTest.[engine:junit-jupiter]/[class:com.github.dakusui.symfonion.tests.MidiCompilerTest]/[test-template:exercise(com.github.dakusui.symfonion.testutils.SymfonionTestCase)]/[test-template-invocation:#12]
- com.github.dakusui.symfonion.tests.MidiCompilerTest.[engine:junit-jupiter]/[class:com.github.dakusui.symfonion.tests.MidiCompilerTest]/[method:pickupNotation_noteOnAtCorrectTick()]
- com.github.dakusui.symfonion.tests.MidiCompilerTest.[engine:junit-jupiter]/[class:com.github.dakusui.symfonion.tests.MidiCompilerTest]/[test-template:exercise(com.github.dakusui.symfonion.testutils.SymfonionTestCase)]/[test-template-invocation:#7]
- com.github.dakusui.symfonion.tests.MidiCompilerTest.[engine:junit-jupiter]/[class:com.github.dakusui.symfonion.tests.MidiCompilerTest]/[test-template:exercise(com.github.dakusui.symfonion.testutils.SymfonionTestCase)]/[test-template-invocation:#6]
- com.github.dakusui.symfonion.tests.MidiCompilerTest.[engine:junit-jupiter]/[class:com.github.dakusui.symfonion.tests.MidiCompilerTest]/[test-template:exercise(com.github.dakusui.symfonion.testutils.SymfonionTestCase)]/[test-template-invocation:#5]
- com.github.dakusui.symfonion.tests.cli.subcommands.CompatCompileTest.[engine:junit-jupiter]/[class:com.github.dakusui.symfonion.tests.cli.subcommands.CompatCompileTest]/[method:test()]
- com.github.dakusui.symfonion.tests.ReferenceErrorTest.[engine:junit-jupiter]/[class:com.github.dakusui.symfonion.tests.ReferenceErrorTest]/[method:missingPart()]
|
| 31 |
|
1.1 Location : portName Killed by : com.github.dakusui.symfonion.tests.MidiCompilerTest.[engine:junit-jupiter]/[class:com.github.dakusui.symfonion.tests.MidiCompilerTest]/[test-template:exercise(com.github.dakusui.symfonion.testutils.SymfonionTestCase)]/[test-template-invocation:#3] replaced return value with "" for com/github/dakusui/symfonion/song/Part::portName → KILLED
|