Skip to content

Commit

Permalink
Merge pull request #6 from faeludire/add-wrapper-for-create-a-quote-api
Browse files Browse the repository at this point in the history
Add shouldCorrectlyFormatDateToISO8601Format test
  • Loading branch information
eludif authored Feb 18, 2021
2 parents e6adab9 + dc35936 commit 604dff4
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
14 changes: 14 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,20 @@
test
</scope>
</dependency>
<dependency>
<groupId>
org.assertj
</groupId>
<artifactId>
assertj-core
</artifactId>
<version>
3.13.2
</version>
<scope>
test
</scope>
</dependency>
</dependencies>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@

import java.time.LocalDateTime;

import com.wrapper.octopusenergy.util.ISODateFormatter;
import org.junit.Test;

import static org.assertj.core.api.Assertions.assertThat;


public class GetProductsApiTest {

@Test
Expand All @@ -12,9 +16,9 @@ public void shouldCorrectlyFormatDateToISO8601Format() {
LocalDateTime localDateTime = LocalDateTime.of(2021, 1, 1, 0, 0, 0);

// when
//ProductsRequest.Builder
String formattedDate = ISODateFormatter.getFormattedDateTimeString(localDateTime);

// then

assertThat(formattedDate).isEqualTo("2021-01-01T00:00Z");
}
}

0 comments on commit 604dff4

Please sign in to comment.