public void Xact_Valid_FailsIfNoDateValue() { Xact xact = new Xact(); Assert.False(xact.Valid()); xact.Date = (Date)DateTime.Today; Assert.True(xact.Valid()); }
public void Journal_Valid_ReturnsFalseIfXactNotValid() { Journal journal = new Journal(); journal.Master = new Account(); Assert.True(journal.Valid()); Xact xact = new Xact(); xact.AddPost(new Post(journal.Master, new Amount(10))); xact.AddPost(new Post(journal.Master, new Amount(-10))); journal.AddXact(xact); Assert.False(xact.Valid()); // [DM] - Xact is not valid (but finalizable to add to the journal) because of no date. Assert.False(journal.Valid()); }