public void WhenDateTimeIsPassedThenWeStoreOnlyDateInAListOfCommentRecordType() { var fields = new FieldSplitter(); var commentRecords = new List <string> { "1/1/2020 12:30" }; var records = fields.SplitFields(commentRecords); var condition = true; foreach (var record in records) { var condition1 = record.DateTime.Equals("1/1/2020 12:30"); var condition2 = record.Comment.Equals(""); condition = condition && condition1 && condition2; } Assert.True(condition); }
public void WhenBothTimestampAndCommentIsPassedThenStoreBothInAListOfCommentRecordType() { var fields = new FieldSplitter(); var commentRecords = new List <string> { "1/1/2020 12:30,Code should be decoupled" }; var records = fields.SplitFields(commentRecords); var condition = true; foreach (var record in records) { var condition1 = record.DateTime.Equals("1/1/2020 12:30"); var condition2 = record.Comment.Equals("Code should be decoupled"); condition = condition && condition1 && condition2; } Assert.True(condition); }