Example #1
0
        public async Task Translate_ToNewObject_Translated()
        {
            var translator = new AsyncTranslator();

            var to = await translator.Translate(new TranslateFrom()
            {
                Property = 1
            });

            Assert.Equal(1, to.Property);
        }
Example #2
0
        public void Translate_Null_ThrowsArgumentNullException()
        {
            var translator = new AsyncTranslator();

            Assert.ThrowsAsync <ArgumentNullException>("source", () => translator.Translate(null));
        }