Skip to content

Commit b587ae7

Browse files
nomemoryCiobanu, Andrei-Nicolin (UK - EDC)
authored andcommitted
Added validation to MockUnits implementation to avoid NullPointerException when those components are not correctly composed with the parent MockNeat.
1 parent 31ab460 commit b587ae7

File tree

91 files changed

+390
-398
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+390
-398
lines changed

examples/net/andreinc/mockneat/Example01.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package net.andreinc.mockneat;
22

33

4-
import net.andreinc.mockneat.interfaces.MockUnit;
4+
import net.andreinc.mockneat.abstraction.MockUnit;
55

66
import java.util.List;
77

examples/net/andreinc/mockneat/github/GenerateMockUnitArray.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import net.andreinc.mockneat.MockNeat;
44
import net.andreinc.mockneat.github.model.Test;
5-
import net.andreinc.mockneat.interfaces.MockUnit;
5+
import net.andreinc.mockneat.abstraction.MockUnit;
66

77
/**
88
* Created by andreinicolinciobanu on 06/03/2017.

examples/net/andreinc/mockneat/github/MockUnitExamplesMapToDouble.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package net.andreinc.mockneat.github;
22

33
import net.andreinc.mockneat.MockNeat;
4-
import net.andreinc.mockneat.interfaces.MockUnitDouble;
4+
import net.andreinc.mockneat.abstraction.MockUnitDouble;
55

66
/**
77
* Created by andreinicolinciobanu on 11/03/2017.

examples/net/andreinc/mockneat/github/MockUnitExamplesMapToInt.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package net.andreinc.mockneat.github;
22

33
import net.andreinc.mockneat.MockNeat;
4-
import net.andreinc.mockneat.interfaces.MockUnitInt;
4+
import net.andreinc.mockneat.abstraction.MockUnitInt;
55

66
import java.util.List;
77

examples/net/andreinc/mockneat/github/MockUnitExamplesMapToLong.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package net.andreinc.mockneat.github;
22

33
import net.andreinc.mockneat.MockNeat;
4-
import net.andreinc.mockneat.interfaces.MockUnit;
4+
import net.andreinc.mockneat.abstraction.MockUnit;
55

66
import java.util.List;
77

examples/net/andreinc/mockneat/github/MockUnitExamplesMapToString.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package net.andreinc.mockneat.github;
22

33
import net.andreinc.mockneat.MockNeat;
4-
import net.andreinc.mockneat.interfaces.MockUnitString;
4+
import net.andreinc.mockneat.abstraction.MockUnitString;
55

66
import java.util.List;
77

examples/net/andreinc/mockneat/github/MockUnitsExample01.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package net.andreinc.mockneat.github;
22

33
import net.andreinc.mockneat.MockNeat;
4-
import net.andreinc.mockneat.interfaces.MockUnit;
4+
import net.andreinc.mockneat.abstraction.MockUnit;
55

66
import java.util.ArrayList;
77
import java.util.List;

src/main/java/net/andreinc/mockneat/MockNeat.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
OTHERWISE, ARISING FROM, FREE_TEXT OF OR PARAM CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS PARAM THE SOFTWARE.
1818
*/
1919

20-
import net.andreinc.mockneat.interfaces.*;
20+
import net.andreinc.mockneat.abstraction.*;
2121
import net.andreinc.mockneat.types.enums.RandomType;
2222
import net.andreinc.mockneat.unit.address.Countries;
2323
import net.andreinc.mockneat.unit.companies.Departments;
@@ -231,7 +231,7 @@ public <T, FT> Factory<T, FT> factory(Class<T> targetCls, Class<FT> factoryCls)
231231

232232
public <T> Reflect<T> reflect(Class<T> cls) { return new Reflect<>(this, cls);}
233233

234-
public <T> Seq<T> seq(Iterable<T> iterable) { return new Seq(this, iterable); }
234+
public <T> Seq<T> seq(Iterable<T> iterable) { return new Seq(iterable); }
235235

236236
public Shufflers shufflers() { return rShufflers; }
237237

src/main/java/net/andreinc/mockneat/interfaces/MockConstValue.java renamed to src/main/java/net/andreinc/mockneat/abstraction/MockConstValue.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package net.andreinc.mockneat.interfaces;
1+
package net.andreinc.mockneat.abstraction;
22

33
/**
44
* Copyright 2017, Andrei N. Ciobanu

src/main/java/net/andreinc/mockneat/interfaces/MockUnit.java renamed to src/main/java/net/andreinc/mockneat/abstraction/MockUnit.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package net.andreinc.mockneat.interfaces;
1+
package net.andreinc.mockneat.abstraction;
22

33
/**
44
* Copyright 2017, Andrei N. Ciobanu

0 commit comments

Comments
 (0)