public void GetHashCode_CountQueryPart_ReturnsZero() { var queryPart = new CountQueryPart(); var expected = 0; var actual = queryPart.GetHashCode(); Assert.That(actual, Is.EqualTo(expected)); }
public void Equals_ObjectSelf_ReturnsTrue() { var queryPart = new CountQueryPart(); object other = queryPart; var expected = true; var actual = queryPart.Equals(other); Assert.That(actual, Is.EqualTo(expected)); }
public void Equals_ObjectOfDifferentType_ReturnsFalse() { var queryPart = new CountQueryPart(); string other = String.Empty; var expected = false; var actual = queryPart.Equals(other); Assert.That(actual, Is.EqualTo(expected)); }
public void Equals_ObjectNull_ReturnsFalse() { var queryPart = new CountQueryPart(); object other = null; var expected = false; var actual = queryPart.Equals(other); Assert.That(actual, Is.EqualTo(expected)); }
public void Equals_AnotherEquivalentCountQueryPart_ReturnsTrue() { var queryPart = new CountQueryPart(); var other = new CountQueryPart(); var expected = true; var actual = queryPart.Equals(other); Assert.That(actual, Is.EqualTo(expected)); }
public void Equals_ObjectAnotherEquivalentCountQueryPart_ReturnsTrue() { var queryPart = new CountQueryPart(); object other = new CountQueryPart(); var expected = true; var actual = queryPart.Equals(other); Assert.That(actual, Is.EqualTo(expected)); }
public void Equals_Self_ReturnsTrue() { var queryPart = new CountQueryPart(); var other = queryPart; var expected = true; var actual = queryPart.Equals(other); Assert.That(actual, Is.EqualTo(expected)); }
public void CountQueryPart_InheritsFromIEquatable() { var actual = new CountQueryPart(); Assert.That(actual, Is.InstanceOf<IEquatable<CountQueryPart>>()); }
public void ToString_NoParameters_ReturnsCorrectString() { var countQueryPart = new CountQueryPart(); Assert.That(countQueryPart.ToString(), Is.EqualTo("$count")); }
public void CountQueryPart_InheritsFromIEquatable() { var actual = new CountQueryPart(); Assert.That(actual, Is.InstanceOf <IEquatable <CountQueryPart> >()); }
protected virtual CountQueryPart VisitCount(CountQueryPart count) { return count; }
protected override CountQueryPart VisitCount(CountQueryPart count) { _expression = Expression.Call(typeof(Queryable), "Count", new[] { _itemType }, _expression); return(base.VisitCount(count)); }