Exemple #1
0
        public void ClassConvertWith()
        {
            var format    = new StringFormatTest("3");
            var converter = new FormatTestDuplicatedConverter2();

            Assert.AreEqual(format.ConvertWith <short>(converter), 3);
        }
Exemple #2
0
        public void ClassConvertWithThrowsExceptionIfDisposed()
        {
            var format    = new StringFormatTest("3");
            var converter = new FormatTestDuplicatedConverter2();

            format.Dispose();
            Assert.Throws <ObjectDisposedException>(() =>
                                                    format.ConvertWith <short>(converter));
        }