Exemplo n.º 1
0
        public void ClassConvertWith()
        {
            var format    = new StringFormatTest("3");
            var converter = new FormatTestDuplicatedConverter2();

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

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