Note.cs 724 B

1234567891011121314151617181920212223242526272829303132
  1. using System;
  2. using Shouldly;
  3. namespace PetaPoco.Tests.Integration.Models
  4. {
  5. public class Note
  6. {
  7. public int Id { get; set; }
  8. public DateTime CreatedOn { get; set; }
  9. public string Text { get; set; }
  10. public void ShouldBe(Note other)
  11. {
  12. Id.ShouldBe(other.Id);
  13. CreatedOn.ShouldBe(other.CreatedOn);
  14. Text.ShouldBe(other.Text);
  15. }
  16. public void ShouldNotBe(Note other, bool sameIds)
  17. {
  18. if (sameIds)
  19. Id.ShouldBe(other.Id);
  20. else
  21. Id.ShouldNotBe(other.Id);
  22. CreatedOn.ShouldNotBe(other.CreatedOn);
  23. Text.ShouldNotBe(other.Text);
  24. }
  25. }
  26. }