Ejemplo n.º 1
0
    public void TestConnection()
    {
        Assert.Pass();
        var service = new NStackLocalizeService(new NStackRepository(Model));

        try
        {
            var temp      = service.GetLanguagesAsync(NStackPlatform.Backend).Result;
            var something = temp.Data;
        }
        catch (Exception)
        {
        }

        Assert.IsTrue(true);
    }
Ejemplo n.º 2
0
    public async Task TestCorrectUrl(NStackPlatform platform, string expectedTranslation)
    {
        await _service.GetLanguagesAsync(platform);

        _repository.Verify(r => r.DoRequestAsync <DataWrapper <List <ResourceData> > >(It.Is <RestRequest>(r => r.Resource.EndsWith(expectedTranslation)), It.IsAny <Action <HttpStatusCode> >()));
    }