public async Task TranslateArray_Empty_Translated() { var translator = new AsyncTranslator(); var to = await translator.TranslateArray( new TranslateFrom[0]); Assert.IsType <TranslateTo[]>(to); Assert.Equal(0, to.Length); }
public async Task TranslateArray_ToNewObject_Translated() { var translator = new AsyncTranslator(); var to = await translator.TranslateArray( new TranslateFrom[] { new TranslateFrom() { Property = 1 }, new TranslateFrom() { Property = 2 } }); Assert.IsType <TranslateTo[]>(to); Assert.Equal(2, to.Length); Assert.Equal(1, to[0].Property); Assert.Equal(2, to[1].Property); }