mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-05-19 13:26:33 +00:00
docs: update observer
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
*/
|
||||
package com.iluwatar.observer;
|
||||
|
||||
/**
|
||||
import lombok.Getter; /**
|
||||
* WeatherType enumeration.
|
||||
*/
|
||||
public enum WeatherType {
|
||||
@@ -34,16 +34,13 @@ public enum WeatherType {
|
||||
WINDY("Windy"),
|
||||
COLD("Cold");
|
||||
|
||||
@Getter
|
||||
private final String description;
|
||||
|
||||
WeatherType(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return this.description;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return this.name().toLowerCase();
|
||||
|
||||
@@ -24,19 +24,17 @@
|
||||
*/
|
||||
package com.iluwatar.observer;
|
||||
|
||||
import com.iluwatar.observer.utils.InMemoryAppender;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import com.iluwatar.observer.utils.InMemoryAppender;
|
||||
import java.util.Collection;
|
||||
import java.util.function.Supplier;
|
||||
import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.TestInstance;
|
||||
import org.junit.jupiter.params.ParameterizedTest;
|
||||
import org.junit.jupiter.params.provider.MethodSource;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
/**
|
||||
* Date: 12/27/15 - 11:44 AM
|
||||
* Weather Observer Tests
|
||||
|
||||
Reference in New Issue
Block a user