public void ErrorWithTooLongValue(string value) { var engine = new FixedFileEngine <ErrorCustomer>(); var customer = new ErrorCustomer { mCustomerID = value }; Assert.Throws <ConvertException>(() => engine.WriteString(new[] { customer })); }
public void ErrorWithShortEnoughValue(string originalValue, string expectedValue) { var engine = new FixedFileEngine <ErrorCustomer>(); var customer = new ErrorCustomer { mCustomerID = originalValue }; var res = engine.WriteString(new[] { customer }); Check.That(res).IsEqualTo($"{expectedValue}{Environment.NewLine}"); }
public void Discard(string originalValue, string expectedValue) { var engine = new FixedFileEngine <DiscardCustomer>(); var customer = new DiscardCustomer { mCustomerID = originalValue }; var res = engine.WriteString(new[] { customer }); Check.That(res).IsEqualTo($"{expectedValue}{Environment.NewLine}"); }