-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
+New test for persistent byte[] Issue #72
- Loading branch information
1 parent
5ff22ec
commit 920df5e
Showing
3 changed files
with
83 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
45 changes: 45 additions & 0 deletions
45
...-provider/src/testFixtures/java/de/ppi/deepsampler/provider/common/TestBeanWithBytes.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/* | ||
* Copyright 2020 PPI AG (Hamburg, Germany) | ||
* This program is made available under the terms of the MIT License. | ||
*/ | ||
|
||
package de.ppi.deepsampler.provider.common; | ||
|
||
import java.util.Arrays; | ||
import java.util.Objects; | ||
|
||
/** | ||
* A very simple Bean that represents non primitive types in TestCases containing a byte[]. | ||
*/ | ||
public class TestBeanWithBytes { | ||
|
||
private byte[] someBytes; | ||
|
||
public TestBeanWithBytes() { | ||
} | ||
|
||
public TestBeanWithBytes(byte[] someBytes) { | ||
this.someBytes = someBytes; | ||
} | ||
|
||
public byte[] getSomeBytes() { | ||
return someBytes; | ||
} | ||
|
||
public void setSomeBytes(byte[] someBytes) { | ||
this.someBytes = someBytes; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) return true; | ||
if (o == null || getClass() != o.getClass()) return false; | ||
TestBeanWithBytes that = (TestBeanWithBytes) o; | ||
return Arrays.equals(someBytes, that.someBytes); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Arrays.hashCode(someBytes); | ||
} | ||
} |
This file contains 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