public static int?GetField(ManyFields entity, [SqlQueryDependent] int i) { throw new InvalidOperationException(); }
public void ShouldGenerateStringForManyFieldsObject() { var value = new ManyFields(1, 1.1, "text", true); var text = value.ToString(); Assert.That(text, Is.StringMatching("^.*, .*, .*, .*$")); Assert.That(text, Is.StringContaining("integer: 1")); Assert.That(text, Is.StringContaining("value: 1.1")); Assert.That(text, Is.StringContaining("text: \"text\"")); Assert.That(text, Is.StringContaining("truth: <True>")); }
public void ShouldGenerateHashCodeForManyFieldsObject() { var value = new ManyFields(10, 5.5, "Hash", true); Assert.That(value.GetHashCode(), Is.EqualTo(HashCode.From(10, 5.5, "Hash", true))); }
public void ShouldConsiderComformingManyFieldsObjectsEqual() { var first = new ManyFields(1, 2.0, "dummy", true); var second = new ManyFields(1, 2.0, "dummy", true); Assert.That(first.Equals(second), Is.True); }
public void ShouldConsiderDifferingManyFieldsObjectsNotEqual(int integer, double value, string text, bool truth) { var first = new ManyFields(1, 2.0, "dummy", true); var second = new ManyFields(integer, value, text, truth); Assert.That(first.Equals(second), Is.False); }