Skip to content

Use plugin in unit tests #9

Description

@juniorjrjl

Ho, whe I try test My viewmodel I get the follow exception:

System.NotImplementedException HResult=0x80004001 Message=This functionality is not implemented in the portable version of this assembly. You should reference the NuGet package from your main application project in order to reference the platform-specific implementation. Source=Plugin.Multilingual StackTrace: at Plugin.Multilingual.CrossMultilingual.get_Current() at TrackerMobile.Forms.ViewModels.EnvioComandoVeiculoViewModel..ctor(AbstractEnvioComandoService envioComandoService, IDBUtils dBUtils, AbstractParametroDAO parametroDAO, IPageDialogService pageDialogService, INavigationService navigationService) in A:\projetos_estudo\C#\mobile\TrackerMobile\TrackerMobile.Forms\TrackerMobile.Forms\ViewModels\EnvioComandoVeiculoViewModel.cs:line 124 at TrackerMobile.TesteUnitario.ViewModel.EnvioComandoVeiculoViewModelTest.QuandoIniciarViewModel_NaoDispararException() in A:\projetos_estudo\C#\mobile\TrackerMobile\TrackerMobile.TesteUnitario\ViewModel\EnvioComandoVeiculoViewModeltest.cs:line 74
How can I configure my test tu work ? Follow my viewmodel:

public EnvioComandoVeiculoViewModel(AbstractEnvioComandoService envioComandoService, IDBUtils dBUtils, AbstractParametroDAO parametroDAO, IPageDialogService pageDialogService, INavigationService navigationService) { _envioComandoService = envioComandoService; _dBUtils = dBUtils; _parametroDAO = parametroDAO; _pageDialogService = pageDialogService; _navigationService = navigationService; _parametroDAO.DbPath = _dBUtils.ObterCaminhoBanco(); _envioComandoService.IpServidor = _parametroDAO.BuscarIp(); _envioComandoService.AccessToken = SessaoUsuario.UsuarioLogado.AccessToken; _envioComandoService.IdiomaAplicacao = CrossMultilingual.Current.CurrentCultureInfo.ToString(); }

thank you :)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions