public static UserDestinationModel ToUserDestinationModel(UserSourceModel userSourceModel)
        {
            UserDestinationModel userDestination = new UserDestinationModel
            {
                FullName = userSourceModel.FullName,
                Login    = userSourceModel.FullName.Replace(' ', '_'),
                Avatar   = userSourceModel.Avatar,
                Disabled = userSourceModel.Disabled,
                Email    = userSourceModel.Email,
                Groups   = GroupFormater(userSourceModel.OrgStructure)
            };

            return(userDestination);
        }
Пример #2
0
        public async Task CreateUserTest_ExsistingUser()
        {
            PluginLoader pluginLoader = new PluginLoader();

            Dictionary <object, object>[] ConfigDictionary = TestHelpers.ReadConfig("Config.yaml");
            pluginLoader.LoadPlugins(ConfigDictionary);
            IDestination    plugin          = PluginLoader.Plugins[0];
            ILoggerFactory  loggerFactory   = LoggerFactory.Create(builder => builder.AddConsole());
            UserSourceModel userSourceModel = new UserSourceModel
            {
                Avatar        = "asdasd",
                Disabled      = false,
                Email         = "*****@*****.**",
                FullName      = "Test User",
                ServiceAction = "save",
                OrgStructure  = new OrgStructureModel
                {
                    Company = "Sellout",
                    Office  = "Cheb",
                    Team    = "MDTC"
                }
            };
        }