コード例 #1
0
        public void ErrorWithTooLongValue(string value)
        {
            var engine   = new FixedFileEngine <ErrorCustomer>();
            var customer = new ErrorCustomer {
                mCustomerID = value
            };

            Assert.Throws <ConvertException>(() => engine.WriteString(new[] { customer }));
        }
コード例 #2
0
        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}");
        }
コード例 #3
0
        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}");
        }