Skip to content

Commit

Permalink
Merge pull request Azure#72 from gcheng/nullableproperty
Browse files Browse the repository at this point in the history
set properties as non-nullable.
  • Loading branch information
Albert Cheng committed Jan 7, 2013
2 parents 9177463 + 95b5c1b commit b392324
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public String getName() {
*
* @return the content file size
*/
public Long getContentFileSize() {
public long getContentFileSize() {
return this.getContent().getContentFileSize();
}

Expand Down Expand Up @@ -93,7 +93,7 @@ public String getEncryptionScheme() {
*
* @return the checks if is encrypted
*/
public Boolean getIsEncrypted() {
public boolean getIsEncrypted() {
return this.getContent().getIsEncrypted();
}

Expand All @@ -120,7 +120,7 @@ public String getInitializationVector() {
*
* @return the checks if is primary
*/
public Boolean getIsPrimary() {
public boolean getIsPrimary() {
return this.getContent().getIsPrimary();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public Date getEndTime() {
*
* @return the priority
*/
public Integer getPriority() {
public int getPriority() {
return getContent().getPriority();
}

Expand All @@ -98,7 +98,7 @@ public Integer getPriority() {
*
* @return the running duration
*/
public Double getRunningDuration() {
public double getRunningDuration() {
return getContent().getRunningDuration();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public String getPerfMessage() {
*
* @return the priority
*/
public Integer getPriority() {
public int getPriority() {
return getContent().getPriority();
}

Expand All @@ -127,7 +127,7 @@ public Integer getPriority() {
*
* @return the progress
*/
public Double getProgress() {
public double getProgress() {
return getContent().getProgress();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ private void verifyJobInfoEqual(String message, JobInfo expected, JobInfo actual
expected.getStartTime(), expected.getEndTime(), actual);
}

private void verifyJobProperties(String message, String testName, Integer priority, Double runningDuration,
@SuppressWarnings("deprecation")
private void verifyJobProperties(String message, String testName, Integer priority, double runningDuration,
JobState state, String templateId, Date created, Date lastModified, Date startTime, Date endTime,
JobInfo actualJob) {
assertNotNull(message, actualJob);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,11 @@ public void testGetSetName() {
public void testGetSetContentFileSize() {
// Arrange
Long expectedContentFileSize = 1234l;
AssetFileInfo fileInfo = new AssetFileInfo(null, new AssetFileType().setContentFileSize(expectedContentFileSize));
AssetFileInfo fileInfo = new AssetFileInfo(null,
new AssetFileType().setContentFileSize(expectedContentFileSize));

// Act
long actualContentFileSize = fileInfo.getContentFileSize().longValue();
long actualContentFileSize = fileInfo.getContentFileSize();

// Assert
assertEquals(expectedContentFileSize.longValue(), actualContentFileSize);
Expand All @@ -73,7 +74,8 @@ public void testGetSetParentAssetId() {
@Test
public void testGetSetEncryptionVersion() {
String expectedEncryptionVersion = "testEncryptionVersion";
AssetFileInfo fileInfo = new AssetFileInfo(null, new AssetFileType().setEncryptionVersion(expectedEncryptionVersion));
AssetFileInfo fileInfo = new AssetFileInfo(null,
new AssetFileType().setEncryptionVersion(expectedEncryptionVersion));

String actualEncryptionVersion = fileInfo.getEncryptionVersion();

Expand All @@ -84,7 +86,8 @@ public void testGetSetEncryptionVersion() {
public void testGetSetEncryptionScheme() {
// Arrange
String expectedEncryptionScheme = "testEncryptionScheme";
AssetFileInfo fileInfo = new AssetFileInfo(null, new AssetFileType().setEncryptionScheme(expectedEncryptionScheme));
AssetFileInfo fileInfo = new AssetFileInfo(null,
new AssetFileType().setEncryptionScheme(expectedEncryptionScheme));

// Act
String actualEncryptionScheme = fileInfo.getEncryptionScheme();
Expand All @@ -109,7 +112,8 @@ public void testGetSetIsEncrypted() {
@Test
public void testGetSetEncryptionKeyId() {
String expectedEncryptionKeyId = "testEncryptionKeyId";
AssetFileInfo fileInfo = new AssetFileInfo(null, new AssetFileType().setEncryptionKeyId(expectedEncryptionKeyId));
AssetFileInfo fileInfo = new AssetFileInfo(null,
new AssetFileType().setEncryptionKeyId(expectedEncryptionKeyId));

String actualEncryptionKeyId = fileInfo.getEncryptionKeyId();

Expand All @@ -119,7 +123,8 @@ public void testGetSetEncryptionKeyId() {
@Test
public void testGetSetInitializationVector() {
String expectedInitializationVector = "testInitializationVector";
AssetFileInfo fileInfo = new AssetFileInfo(null, new AssetFileType().setInitializationVector(expectedInitializationVector));
AssetFileInfo fileInfo = new AssetFileInfo(null,
new AssetFileType().setInitializationVector(expectedInitializationVector));

String actualInitializationVector = fileInfo.getInitializationVector();

Expand Down Expand Up @@ -173,7 +178,8 @@ public void testGetSetMimeType() {
@Test
public void testGetSetContentChecksum() {
String expectedContentChecksum = "testContentChecksum";
AssetFileInfo fileInfo = new AssetFileInfo(null, new AssetFileType().setContentChecksum(expectedContentChecksum));
AssetFileInfo fileInfo = new AssetFileInfo(null,
new AssetFileType().setContentChecksum(expectedContentChecksum));

String actualContentChecksum = fileInfo.getContentChecksum();

Expand Down

0 comments on commit b392324

Please sign in to comment.