Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
ethlo committed Aug 4, 2019
1 parent 25a2638 commit 0041f3a
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 3 deletions.
20 changes: 20 additions & 0 deletions src/test/java/com/ethlo/time/FieldTest.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
package com.ethlo.time;

/*-
* #%L
* Internet Time Utility
* %%
* Copyright (C) 2017 - 2019 Morten Haraldsen (ethlo)
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/

import java.time.LocalDate;
import java.time.OffsetDateTime;
import java.time.Year;
Expand Down
24 changes: 22 additions & 2 deletions src/test/java/com/ethlo/time/ITUTest.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
package com.ethlo.time;

/*-
* #%L
* Internet Time Utility
* %%
* Copyright (C) 2017 - 2019 Morten Haraldsen (ethlo)
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/

import static org.fest.assertions.api.Assertions.assertThat;

import java.time.OffsetDateTime;
Expand Down Expand Up @@ -81,10 +101,10 @@ public void parseLenient2()
{
assertThat(ITU.parseLenient("2017-01-31", YearMonth.class)).isNotNull();
}

@Test
public void toEpochMillis()
{
assertThat(ITU.toEpochMillis(VALID_DATETIME));
}
}
}
2 changes: 1 addition & 1 deletion src/test/java/com/ethlo/time/W3cCorrectnessTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public void testFormatYearMonth()
@Test
public void testFormatYearMonthDay()
{
assertThat(w3cDateUtil.format(OffsetDateTime.parse("2012-01-14T12:34:56Z"), Field.MONTH)).isEqualTo("2012-01-14");
assertThat(w3cDateUtil.format(OffsetDateTime.parse("2012-01-14T12:34:56Z"), Field.DAY)).isEqualTo("2012-01-14");
}

@Test
Expand Down

0 comments on commit 0041f3a

Please sign in to comment.