fix: Fix minor typos (#2619)

Signed-off-by: Marcel Ribeiro-Dantas <mribeirodantas@seqera.io>
Co-authored-by: Ilkka Seppälä <iluwatar@users.noreply.github.com>
This commit is contained in:
Marcel Ribeiro-Dantas
2023-10-14 12:59:21 -03:00
committed by GitHub
parent be0d5e5953
commit f79782bea9
30 changed files with 43 additions and 42 deletions
+4 -4
View File
@@ -32,8 +32,8 @@ public abstract class Superpower {
logger.info("Move to ( " + x + ", " + y + ", " + z + " )");
}
protected void playSound(String soundName, int volumn) {
logger.info("Play " + soundName + " with volumn " + volumn);
protected void playSound(String soundName, int volume) {
logger.info("Play " + soundName + " with volume " + volume);
}
protected void spawnParticles(String particleType, int count) {
@@ -88,11 +88,11 @@ Program output:
```
// Use superpower: sky launch
// Move to ( 0.0, 0.0, 20.0 )
// Play SKYLAUNCH_SOUND with volumn 1
// Play SKYLAUNCH_SOUND with volume 1
// Spawn 100 particle with type SKYLAUNCH_PARTICLE
// Use superpower: ground dive
// Move to ( 0.0, 0.0, -20.0 )
// Play GROUNDDIVE_SOUND with volumn 5
// Play GROUNDDIVE_SOUND with volume 5
// Spawn 20 particle with type GROUNDDIVE_PARTICLE
```
## Class diagram
@@ -18,7 +18,7 @@ package com.iluwatar.subclasssandbox {
+ Superpower()
# activate() {abstract}
# move(x : double, y : double, z : double)
# playSound(soundName : String, volumn : int)
# playSound(soundName : String, volume : int)
# spawnParticles(particleType : String, count : int)
}
}
@@ -53,10 +53,10 @@ public abstract class Superpower {
/**
* Play sound effect for the superpower.
* @param soundName Sound name.
* @param volumn Value of volumn.
* @param volume Value of volume.
*/
protected void playSound(String soundName, int volumn) {
logger.info("Play " + soundName + " with volumn " + volumn);
protected void playSound(String soundName, int volume) {
logger.info("Play " + soundName + " with volume " + volume);
}
/**
@@ -48,7 +48,7 @@ class GroundDiveTest {
void testPlaySound() throws Exception {
var groundDive = new GroundDive();
var outputLog = getLogContent(() -> groundDive.playSound("SOUND_NAME", 1));
var expectedLog = "Play SOUND_NAME with volumn 1";
var expectedLog = "Play SOUND_NAME with volume 1";
assertEquals(outputLog, expectedLog);
}
@@ -70,7 +70,7 @@ class GroundDiveTest {
final var log1 = logs[0].split("-")[1].trim() + " -" + logs[0].split("-")[2].trim();
final var expectedLog1 = "Move to ( 0.0, 0.0, -20.0 )";
final var log2 = getLogContent(logs[1]);
final var expectedLog2 = "Play GROUNDDIVE_SOUND with volumn 5";
final var expectedLog2 = "Play GROUNDDIVE_SOUND with volume 5";
final var log3 = getLogContent(logs[2]);
final var expectedLog3 = "Spawn 20 particle with type GROUNDDIVE_PARTICLE";
assertEquals(logs.length, expectedSize);
@@ -47,7 +47,7 @@ class SkyLaunchTest {
void testPlaySound() throws Exception {
var skyLaunch = new SkyLaunch();
var outputLog = getLogContent(() -> skyLaunch.playSound("SOUND_NAME", 1));
var expectedLog = "Play SOUND_NAME with volumn 1";
var expectedLog = "Play SOUND_NAME with volume 1";
assertEquals(outputLog, expectedLog);
}
@@ -69,7 +69,7 @@ class SkyLaunchTest {
final var log1 = getLogContent(logs[0]);
final var expectedLog1 = "Move to ( 0.0, 0.0, 20.0 )";
final var log2 = getLogContent(logs[1]);
final var expectedLog2 = "Play SKYLAUNCH_SOUND with volumn 1";
final var expectedLog2 = "Play SKYLAUNCH_SOUND with volume 1";
final var log3 = getLogContent(logs[2]);
final var expectedLog3 = "Spawn 100 particle with type SKYLAUNCH_PARTICLE";
assertEquals(logs.length, expectedSize);