Exemplo n.º 1
0
        public async Task TestAuthentNotOk()
        {
            string username = "******";
            string password = "******";

            MatterMostClient client = new MatterMostClient(new Uri("https://gitlab.mattermost.com"), "dotnetmm", new MatterMostUser(username, password));
            var uat = await client.AuthenticateAsync();

            Assert.False(uat);
        }
Exemplo n.º 2
0
        public async Task TestAuthentOk()
        {
            string username = "******";
            string password = "******";

            MatterMostClient client = new MatterMostClient(new Uri("https://gitlab.mattermost.com"),
                                                           "dotnetmm", new MatterMostUser(username, password));
            var uat = await client.AuthenticateAsync();

            Assert.True(uat);
        }
Exemplo n.º 3
0
        public async Task TestJoinedChannels()
        {
            string username = "******";
            string password = "******";

            MatterMostClient client = new MatterMostClient(new Uri("https://gitlab.mattermost.com"), "dotnetmm", new MatterMostUser(username, password));
            var uat = await client.AuthenticateAsync();

            var teams = await client.GetMyTeamsAsync();

            var channels = await client.GetJoinedChannelAsync(teams.FirstOrDefault());

            Assert.True(channels.Any());
        }