This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class Element { | |
| private final String name; | |
| private String text; | |
| public Element(String name) { | |
| this.name = name; | |
| this.text = ""; | |
| } | |
| public void addText(String newText) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class Invoice { | |
| private final ShippingPricer shippingPricer; | |
| // ... | |
| public Invoice( | |
| OurDate billingDate, | |
| OurDate openingDate, | |
| Originator originator | |
| // ... | |
| ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class Invoice { | |
| //... | |
| public Money getValue() { | |
| Money total = this.itemsSum(); | |
| if (this.billingDate.after(OurDate.yearEnd(this.openingDate))) { | |
| if ( | |
| this.originator.getState().equals("FL") || | |
| this.originator.getState().equals("NY") | |
| ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class InMemoryDirectory { | |
| private final List<Element> elements; | |
| public InMemoryDirectory() { | |
| this.elements = new ArrayList<>(); | |
| } | |
| public void addElement(Element newElement) { | |
| this.elements.add(newElement); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package unit_tests; | |
| import org.junit.jupiter.api.Test; | |
| import org.junit.jupiter.params.ParameterizedTest; | |
| import org.junit.jupiter.params.provider.ValueSource; | |
| import tirepressuremonitoringsystem.Alarm; | |
| import java.util.*; | |
| import java.util.stream.Stream; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.argentrose; | |
| import java.util.ArrayList; | |
| import java.util.List; | |
| import java.util.Objects; | |
| import java.util.StringJoiner; | |
| public class ArgentRoseStore { | |
| private final List<Product> inventory; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.argentrose; | |
| import java.util.ArrayList; | |
| import java.util.List; | |
| import java.util.Objects; | |
| import java.util.StringJoiner; | |
| public class ArgentRoseStore { | |
| private final List<Product> inventory; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.argentrose; | |
| import org.junit.jupiter.api.DisplayName; | |
| import org.junit.jupiter.api.Test; | |
| import org.junit.jupiter.params.ParameterizedTest; | |
| import org.junit.jupiter.params.provider.ValueSource; | |
| import java.util.Arrays; | |
| import static org.assertj.core.api.Assertions.assertThat; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.argentrose; | |
| import org.junit.jupiter.api.DisplayName; | |
| import org.junit.jupiter.api.Test; | |
| import org.junit.jupiter.params.ParameterizedTest; | |
| import org.junit.jupiter.params.provider.ValueSource; | |
| import java.util.Arrays; | |
| import static org.assertj.core.api.Assertions.assertThat; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.argentrose; | |
| import org.junit.jupiter.api.DisplayName; | |
| import org.junit.jupiter.api.Test; | |
| import java.util.Arrays; | |
| import static org.assertj.core.api.Assertions.assertThat; | |
| public class ArgentRoseStoreTest { |
NewerOlder