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

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

            format.Dispose();
            Assert.Throws <ObjectDisposedException>(() =>
                                                    format.ConvertWith <short>(converter));
        }
Ejemplo n.º 3
0
        public void ConvertWith()
        {
            var format    = new StringFormatTest("3");
            var converter = new FormatTestDuplicatedConverter2();

            Assert.AreEqual(
                Format.ConvertWith(format, typeof(short), converter),
                3);
        }