Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code refactor / Improved unit tests #12

Merged
merged 4 commits into from
Oct 1, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public void Assert_Boolean_Contains_On_Value_Dynamic_Query_Expression_Is_Generat
// Assert
Assert.NotEmpty(result);
Assert.Contains(result, t => randomBooleans.Contains(t.Boolean));
Assert.DoesNotContain(result, t => randomBooleans.Contains(t.Boolean) == false);
Assert.DoesNotContain(result, t => !randomBooleans.Contains(t.Boolean));
}

// Boolean Array
Expand All @@ -102,7 +102,7 @@ public void Assert_Boolean_Array_Equality_Dynamic_Query_Expression_Is_Generated_
// Assert
Assert.NotEmpty(result);
Assert.Contains(result, t => t.BooleanArray.SequenceEqual(randomHydra.BooleanArray));
Assert.DoesNotContain(result, t => t.BooleanArray.SequenceEqual(randomHydra.BooleanArray) == false);
Assert.DoesNotContain(result, t => !t.BooleanArray.SequenceEqual(randomHydra.BooleanArray));
}

/// <summary>
Expand All @@ -120,7 +120,7 @@ public void Assert_Boolean_Array_Inequality_Dynamic_Query_Expression_Is_Generate

// Assert
Assert.NotEmpty(result);
Assert.Contains(result, t => t.BooleanArray.SequenceEqual(randomHydra.BooleanArray) == false);
Assert.Contains(result, t => !t.BooleanArray.SequenceEqual(randomHydra.BooleanArray));
Assert.DoesNotContain(result, t => t.BooleanArray.SequenceEqual(randomHydra.BooleanArray));
}

Expand All @@ -140,7 +140,7 @@ public void Assert_Boolean_Array_Equality_Expression_With_List_Value_Is_Generate
// Assert
Assert.NotEmpty(result);
Assert.Contains(result, t => t.BooleanArray.SequenceEqual(randomHydra.BooleanArray));
Assert.DoesNotContain(result, t => t.BooleanArray.SequenceEqual(randomHydra.BooleanArray) == false);
Assert.DoesNotContain(result, t => !t.BooleanArray.SequenceEqual(randomHydra.BooleanArray));
}

/// <summary>
Expand All @@ -158,7 +158,7 @@ public void Assert_Boolean_Array_Inequality_Expression_With_List_Value_Is_Genera

// Assert
Assert.NotEmpty(result);
Assert.Contains(result, t => t.BooleanArray.SequenceEqual(randomHydra.BooleanArray) == false);
Assert.Contains(result, t => !t.BooleanArray.SequenceEqual(randomHydra.BooleanArray));
Assert.DoesNotContain(result, t => t.BooleanArray.SequenceEqual(randomHydra.BooleanArray));
}

Expand All @@ -178,7 +178,7 @@ public void Assert_Boolean_Array_Contains_Single_Value_Dynamic_Query_Expression_
// Assert
Assert.NotEmpty(result);
Assert.Contains(result, t => t.BooleanArray.Contains(randomBoolean));
Assert.DoesNotContain(result, t => t.BooleanArray.Contains(randomBoolean) == false);
Assert.DoesNotContain(result, t => !t.BooleanArray.Contains(randomBoolean));
}

/// <summary>
Expand All @@ -197,7 +197,7 @@ public void Assert_Boolean_Collection_Equality_Dynamic_Query_Expression_Is_Gener
// Assert
Assert.NotEmpty(result);
Assert.Contains(result, t => t.BooleanCollection.SequenceEqual(randomHydra.BooleanCollection));
Assert.DoesNotContain(result, t => t.BooleanCollection.SequenceEqual(randomHydra.BooleanCollection) == false);
Assert.DoesNotContain(result, t => !t.BooleanCollection.SequenceEqual(randomHydra.BooleanCollection));
}

/// <summary>
Expand All @@ -215,7 +215,7 @@ public void Assert_Boolean_Collection_Inequality_Dynamic_Query_Expression_Is_Gen

// Assert
Assert.NotEmpty(result);
Assert.Contains(result, t => t.BooleanCollection.SequenceEqual(randomHydra.BooleanCollection) == false);
Assert.Contains(result, t => !t.BooleanCollection.SequenceEqual(randomHydra.BooleanCollection));
Assert.DoesNotContain(result, t => t.BooleanCollection.SequenceEqual(randomHydra.BooleanCollection));
}

Expand All @@ -235,7 +235,7 @@ public void Assert_Boolean_Collection_Equality_Expression_With_Array_Value_Is_Ge
// Assert
Assert.NotEmpty(result);
Assert.Contains(result, t => t.BooleanCollection.SequenceEqual(randomHydra.BooleanCollection));
Assert.DoesNotContain(result, t => t.BooleanCollection.SequenceEqual(randomHydra.BooleanCollection) == false);
Assert.DoesNotContain(result, t => !t.BooleanCollection.SequenceEqual(randomHydra.BooleanCollection));
}

/// <summary>
Expand All @@ -253,7 +253,7 @@ public void Assert_Boolean_Collection_Inequality_Expression_With_Array_Value_Is_

// Assert
Assert.NotEmpty(result);
Assert.Contains(result, t => t.BooleanCollection.SequenceEqual(randomHydra.BooleanCollection) == false);
Assert.Contains(result, t => !t.BooleanCollection.SequenceEqual(randomHydra.BooleanCollection));
Assert.DoesNotContain(result, t => t.BooleanCollection.SequenceEqual(randomHydra.BooleanCollection));
}

Expand All @@ -273,7 +273,7 @@ public void Assert_Boolean_Collection_Contains_Single_Value_Dynamic_Query_Expres
// Assert
Assert.NotEmpty(result);
Assert.Contains(result, t => t.BooleanCollection.Contains(randomBoolean));
Assert.DoesNotContain(result, t => t.BooleanCollection.Contains(randomBoolean) == false);
Assert.DoesNotContain(result, t => !t.BooleanCollection.Contains(randomBoolean));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public void Assert_Nullable_Boolean_Contains_On_Value_Dynamic_Query_Expression_I
// Assert
Assert.NotEmpty(result);
Assert.Contains(result, t => randomBooleans.Contains(t.NullableBoolean));
Assert.DoesNotContain(result, t => randomBooleans.Contains(t.NullableBoolean) == false);
Assert.DoesNotContain(result, t => !randomBooleans.Contains(t.NullableBoolean));
}

// Boolean Array
Expand All @@ -102,7 +102,7 @@ public void Assert_Nullable_Boolean_Array_Equality_Dynamic_Query_Expression_Is_G
// Assert
Assert.NotEmpty(result);
Assert.Contains(result, t => t.NullableBooleanArray.SequenceEqual(randomHydra.NullableBooleanArray));
Assert.DoesNotContain(result, t => t.NullableBooleanArray.SequenceEqual(randomHydra.NullableBooleanArray) == false);
Assert.DoesNotContain(result, t => !t.NullableBooleanArray.SequenceEqual(randomHydra.NullableBooleanArray));
}

/// <summary>
Expand All @@ -120,7 +120,7 @@ public void Assert_Nullable_Boolean_Array_Inequality_Dynamic_Query_Expression_Is

// Assert
Assert.NotEmpty(result);
Assert.Contains(result, t => t.NullableBooleanArray.SequenceEqual(randomHydra.NullableBooleanArray) == false);
Assert.Contains(result, t => !t.NullableBooleanArray.SequenceEqual(randomHydra.NullableBooleanArray));
Assert.DoesNotContain(result, t => t.NullableBooleanArray.SequenceEqual(randomHydra.NullableBooleanArray));
}

Expand All @@ -140,7 +140,7 @@ public void Assert_Nullable_Boolean_Array_Equality_Expression_With_List_Value_Is
// Assert
Assert.NotEmpty(result);
Assert.Contains(result, t => t.NullableBooleanArray.SequenceEqual(randomHydra.NullableBooleanArray));
Assert.DoesNotContain(result, t => t.NullableBooleanArray.SequenceEqual(randomHydra.NullableBooleanArray) == false);
Assert.DoesNotContain(result, t => !t.NullableBooleanArray.SequenceEqual(randomHydra.NullableBooleanArray));
}

/// <summary>
Expand All @@ -158,7 +158,7 @@ public void Assert_Nullable_Boolean_Array_Inequality_Expression_With_List_Value_

// Assert
Assert.NotEmpty(result);
Assert.Contains(result, t => t.NullableBooleanArray.SequenceEqual(randomHydra.NullableBooleanArray) == false);
Assert.Contains(result, t => !t.NullableBooleanArray.SequenceEqual(randomHydra.NullableBooleanArray));
Assert.DoesNotContain(result, t => t.NullableBooleanArray.SequenceEqual(randomHydra.NullableBooleanArray));
}

Expand All @@ -178,7 +178,7 @@ public void Assert_Nullable_Boolean_Array_Contains_Single_Value_Dynamic_Query_Ex
// Assert
Assert.NotEmpty(result);
Assert.Contains(result, t => t.NullableBooleanArray.Contains(randomBoolean));
Assert.DoesNotContain(result, t => t.NullableBooleanArray.Contains(randomBoolean) == false);
Assert.DoesNotContain(result, t => !t.NullableBooleanArray.Contains(randomBoolean));
}

/// <summary>
Expand All @@ -197,7 +197,7 @@ public void Assert_Nullable_Boolean_Collection_Equality_Dynamic_Query_Expression
// Assert
Assert.NotEmpty(result);
Assert.Contains(result, t => t.NullableBooleanCollection.SequenceEqual(randomHydra.NullableBooleanCollection));
Assert.DoesNotContain(result, t => t.NullableBooleanCollection.SequenceEqual(randomHydra.NullableBooleanCollection) == false);
Assert.DoesNotContain(result, t => !t.NullableBooleanCollection.SequenceEqual(randomHydra.NullableBooleanCollection));
}

/// <summary>
Expand All @@ -215,7 +215,7 @@ public void Assert_Nullable_Boolean_Collection_Inequality_Dynamic_Query_Expressi

// Assert
Assert.NotEmpty(result);
Assert.Contains(result, t => t.NullableBooleanCollection.SequenceEqual(randomHydra.NullableBooleanCollection) == false);
Assert.Contains(result, t => !t.NullableBooleanCollection.SequenceEqual(randomHydra.NullableBooleanCollection));
Assert.DoesNotContain(result, t => t.NullableBooleanCollection.SequenceEqual(randomHydra.NullableBooleanCollection));
}

Expand All @@ -235,7 +235,7 @@ public void Assert_Nullable_Boolean_Collection_Equality_Expression_With_Array_Va
// Assert
Assert.NotEmpty(result);
Assert.Contains(result, t => t.NullableBooleanCollection.SequenceEqual(randomHydra.NullableBooleanCollection));
Assert.DoesNotContain(result, t => t.NullableBooleanCollection.SequenceEqual(randomHydra.NullableBooleanCollection) == false);
Assert.DoesNotContain(result, t => !t.NullableBooleanCollection.SequenceEqual(randomHydra.NullableBooleanCollection));
}

/// <summary>
Expand All @@ -253,7 +253,7 @@ public void Assert_Nullable_Boolean_Collection_Inequality_Expression_With_Array_

// Assert
Assert.NotEmpty(result);
Assert.Contains(result, t => t.NullableBooleanCollection.SequenceEqual(randomHydra.NullableBooleanCollection) == false);
Assert.Contains(result, t => !t.NullableBooleanCollection.SequenceEqual(randomHydra.NullableBooleanCollection));
Assert.DoesNotContain(result, t => t.NullableBooleanCollection.SequenceEqual(randomHydra.NullableBooleanCollection));
}

Expand All @@ -273,7 +273,7 @@ public void Assert_Nullable_Boolean_Collection_Contains_Single_Value_Dynamic_Que
// Assert
Assert.NotEmpty(result);
Assert.Contains(result, t => t.NullableBooleanCollection.Contains(randomBoolean));
Assert.DoesNotContain(result, t => t.NullableBooleanCollection.Contains(randomBoolean) == false);
Assert.DoesNotContain(result, t => !t.NullableBooleanCollection.Contains(randomBoolean));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public void Assert_Char_Contains_On_Value_Dynamic_Query_Expression_Is_Generated_
// Assert
Assert.NotEmpty(result);
Assert.Contains(result, t => randomChars.Contains(t.Char));
Assert.DoesNotContain(result, t => randomChars.Contains(t.Char) == false);
Assert.DoesNotContain(result, t => !randomChars.Contains(t.Char));
}

// Char Array
Expand All @@ -100,7 +100,7 @@ public void Assert_Char_Array_Equality_Dynamic_Query_Expression_Is_Generated_Cor
// Assert
Assert.NotEmpty(result);
Assert.Contains(result, t => t.CharArray.SequenceEqual(randomHydra.CharArray));
Assert.DoesNotContain(result, t => t.CharArray.SequenceEqual(randomHydra.CharArray) == false);
Assert.DoesNotContain(result, t => !t.CharArray.SequenceEqual(randomHydra.CharArray));
}

/// <summary>
Expand All @@ -118,7 +118,7 @@ public void Assert_Char_Array_Inequality_Dynamic_Query_Expression_Is_Generated_C

// Assert
Assert.NotEmpty(result);
Assert.Contains(result, t => t.CharArray.SequenceEqual(randomHydra.CharArray) == false);
Assert.Contains(result, t => !t.CharArray.SequenceEqual(randomHydra.CharArray));
Assert.DoesNotContain(result, t => t.CharArray.SequenceEqual(randomHydra.CharArray));
}

Expand All @@ -138,7 +138,7 @@ public void Assert_Char_Array_Equality_Expression_With_List_Value_Is_Generated_C
// Assert
Assert.NotEmpty(result);
Assert.Contains(result, t => t.CharArray.SequenceEqual(randomHydra.CharArray));
Assert.DoesNotContain(result, t => t.CharArray.SequenceEqual(randomHydra.CharArray) == false);
Assert.DoesNotContain(result, t => !t.CharArray.SequenceEqual(randomHydra.CharArray));
}

/// <summary>
Expand All @@ -156,7 +156,7 @@ public void Assert_Char_Array_Inequality_Expression_With_List_Value_Is_Generated

// Assert
Assert.NotEmpty(result);
Assert.Contains(result, t => t.CharArray.SequenceEqual(randomHydra.CharArray) == false);
Assert.Contains(result, t => !t.CharArray.SequenceEqual(randomHydra.CharArray));
Assert.DoesNotContain(result, t => t.CharArray.SequenceEqual(randomHydra.CharArray));
}

Expand All @@ -176,7 +176,7 @@ public void Assert_Char_Array_Contains_Single_Value_Dynamic_Query_Expression_Is_
// Assert
Assert.NotEmpty(result);
Assert.Contains(result, t => t.CharArray.Contains(randomChar));
Assert.DoesNotContain(result, t => t.CharArray.Contains(randomChar) == false);
Assert.DoesNotContain(result, t => !t.CharArray.Contains(randomChar));
}

/// <summary>
Expand All @@ -195,7 +195,7 @@ public void Assert_Char_Collection_Equality_Dynamic_Query_Expression_Is_Generate
// Assert
Assert.NotEmpty(result);
Assert.Contains(result, t => t.CharCollection.SequenceEqual(randomHydra.CharCollection));
Assert.DoesNotContain(result, t => t.CharCollection.SequenceEqual(randomHydra.CharCollection) == false);
Assert.DoesNotContain(result, t => !t.CharCollection.SequenceEqual(randomHydra.CharCollection));
}

/// <summary>
Expand All @@ -213,7 +213,7 @@ public void Assert_Char_Collection_Inequality_Dynamic_Query_Expression_Is_Genera

// Assert
Assert.NotEmpty(result);
Assert.Contains(result, t => t.CharCollection.SequenceEqual(randomHydra.CharCollection) == false);
Assert.Contains(result, t => !t.CharCollection.SequenceEqual(randomHydra.CharCollection));
Assert.DoesNotContain(result, t => t.CharCollection.SequenceEqual(randomHydra.CharCollection));
}

Expand All @@ -233,7 +233,7 @@ public void Assert_Char_Collection_Equality_Expression_With_Array_Value_Is_Gener
// Assert
Assert.NotEmpty(result);
Assert.Contains(result, t => t.CharCollection.SequenceEqual(randomHydra.CharCollection));
Assert.DoesNotContain(result, t => t.CharCollection.SequenceEqual(randomHydra.CharCollection) == false);
Assert.DoesNotContain(result, t => !t.CharCollection.SequenceEqual(randomHydra.CharCollection));
}

/// <summary>
Expand All @@ -251,7 +251,7 @@ public void Assert_Char_Collection_Inequality_Expression_With_Array_Value_Is_Gen

// Assert
Assert.NotEmpty(result);
Assert.Contains(result, t => t.CharCollection.SequenceEqual(randomHydra.CharCollection) == false);
Assert.Contains(result, t => !t.CharCollection.SequenceEqual(randomHydra.CharCollection));
Assert.DoesNotContain(result, t => t.CharCollection.SequenceEqual(randomHydra.CharCollection));
}

Expand All @@ -271,7 +271,7 @@ public void Assert_Char_Collection_Contains_Single_Value_Dynamic_Query_Expressio
// Assert
Assert.NotEmpty(result);
Assert.Contains(result, t => t.CharCollection.Contains(randomChar));
Assert.DoesNotContain(result, t => t.CharCollection.Contains(randomChar) == false);
Assert.DoesNotContain(result, t => !t.CharCollection.Contains(randomChar));
}
}
}
Loading