Inheritance: IRocketChatDriver
コード例 #1
0
        public async Task Send_attachments()
        {
            //const string password = "******";

            //var driver = new RocketChatDriver("demo.rocket.chat", true, _xUnitLogger);
            var userName = Constants.OneEmail;
            var password = Constants.OnePassword;

            var driver = new RocketChatDriver(Constants.RocketServer, false, _xUnitLogger);

            await driver.ConnectAsync();
            await driver.LoginWithEmailAsync(userName, password);

            var roomId = await driver.GetRoomIdAsync("GENERAL");

            //var a = await driver.SendCustomMessageAsync("test mesage", "name", roomId.Result);

            driver.Dispose();
        }
コード例 #2
0
        public async Task Can_login()
        {
            //const string password = "******";

            //var driver = new RocketChatDriver("demo.rocket.chat", true, _xUnitLogger);

            var driver = new RocketChatDriver(Constants.RocketServer, false, _xUnitLogger);

            await driver.ConnectAsync();
            var loginResult = await driver.LoginWithEmailAsync(Constants.OneEmail, Constants.OnePassword);

            var roomId = await driver.GetRoomIdAsync("GENERAL");

            await driver.JoinRoomAsync(roomId.Result);

            await driver.SubscribeToRoomAsync(roomId.Result);

            var messages = await driver.SendMessageAsync("", roomId.Result);

            driver.Dispose();
        }
コード例 #3
0
        private static async Task<IRocketChatDriver> ComposeAsync()
        {
            var driver = new RocketChatDriver(Constants.RocketServer, false);
            await driver.ConnectAsync();
            await driver.LoginWithEmailAsync(Constants.OneEmail, Constants.OnePassword);
            await driver.SubscribeToRoomListAsync();

            return driver;
        }