public void empty_sequence_returned_for_null() { HasProperties item = null; Assert.IsNotNull(item.AsSeq()); Assert.AreEqual(0, item.AsSeq().Count()); }
public void sequence_returned_for_object() { HasProperties item = new HasProperties(); Assert.IsNotNull(item.AsSeq()); Assert.AreNotEqual(0, item.AsSeq().Count()); }
public void sequence_contains_value_of_nullable_struct(long value) { HasProperties item = new HasProperties { OptLong = value }; var pair = item.AsSeq().FirstOrDefault(p => p.Key == nameof(HasProperties.OptLong)); Assert.AreEqual(value, pair.Value); }
public void sequence_contains_value_of_class(string value) { HasProperties item = new HasProperties { Text = value }; var pair = item.AsSeq().FirstOrDefault(p => p.Key == nameof(HasProperties.Text)); Assert.AreEqual(value, pair.Value); }
public void sequence_contains_value_of_struct(int value) { HasProperties item = new HasProperties { Int1 = value }; var pair = item.AsSeq().First(p => p.Key == nameof(HasProperties.Int1)); Assert.AreEqual(value, pair.Value); }
public void sequence_does_not_contain_value_of_nullable_struct() { HasProperties item = new HasProperties(); Assert.IsFalse(item.AsSeq().Contains(p => p.Key == nameof(HasProperties.OptLong))); }
public void sequence_does_not_contain_value_of_null_class() { HasProperties item = new HasProperties(); Assert.IsFalse(item.AsSeq().Contains(p => p.Key == nameof(HasProperties.Text))); }
public void sequence_contains_pair_for_default_value_of_int() { HasProperties item = new HasProperties(); Assert.IsTrue(item.AsSeq().Contains(p => p.Key == nameof(HasProperties.Int1))); }