public void ConvertToXml_GivenValidObject_MapsCorrectly() { //Arrange var entitiesMapper = new EntitiesMapper(_entityMapper.Object); var entities = new Entities() { new Entity("test") }; //Act var entityclasses = entitiesMapper.Convert(entities); //Assert Assert.IsInstanceOfType(entityclasses, typeof(entity_classes)); Assert.AreEqual(1, entityclasses.Items.Length); }
public void ConvertToDomain_GivenValidObject_MapsCorrectly() { //Arrange var entitiesMapper = new EntitiesMapper(_entityMapper.Object); var entityclasses = new entity_classes() { Items = new object[1] { new entity_classesEntity_class() } }; //Act var entities = entitiesMapper.Convert(entityclasses); //Assert Assert.IsInstanceOfType(entities, typeof(Entities)); Assert.AreEqual(1, entities.Count); }