public async Task ExecuteMutationCreateChatTxn()
        {
            MutationCreateChatTxn_Output output =
                await MGTMutationExecute.ExecuteMutationCreateChatTxn(clientMGT : clientMGT, _url : url, _token : token);

            Assert.That(output, Is.Not.Null);
            Assert.That(output.ResultConfirmation.resultPassed, Is.True);
            Assert.That(output.chat, Is.Not.Null);
            Assert.That(output.chat.chatId, Is.GreaterThan(0));
        }
예제 #2
0
        public static async Task <MutationCreateChatTxn_Output> TestMutationCreateChatTxn()
        {
            IMGTExchangeClient clientMGT = new MGTExchangeClient();
            string             _url      = "http://10.18.24.67:8082/";
            string             _token    = "token";

            // Pending, when the user is not from this company return: Inner Exception

            MutationCreateChatTxn_Input input = new MutationCreateChatTxn_Input
            {
                chat = new chat
                {
                    chatId       = 0,
                    name         = "Chat 1",
                    companyId    = "04c6b67c-6f4d-455f-a472-d6206dd769df",
                    participants = new List <participant>
                    {
                        new participant
                        {
                            participantId = 0,
                            chatId        = 0,
                            isAdmin       = true,
                            userAppId     = "10d3ed1e-ae7d-4d0c-80e0-aa360d76025b"
                        },
                        new participant
                        {
                            participantId = 0,
                            chatId        = 0,
                            isAdmin       = false,
                            userAppId     = "127b0df2-d732-478e-bf84-0b673c48d145"
                        },
                        new participant
                        {
                            participantId = 0,
                            chatId        = 0,
                            isAdmin       = false,
                            userAppId     = "3982349d-289d-4f3a-ab29-f3f6bb3893f4"
                        }
                    },
                },
                url   = _url,
                token = _token
            };

            MutationCreateChatTxn_Output output =
                await clientMGT.MutationCreateChatTxn(input : input);

            return(output);
        }
예제 #3
0
        public async Task TestMutationCreateChatTxn()
        {
            // Pending, when the user is not from this company return: Ineer Exception
            List <participant> participants = new List <participant>
            {
                new participant {
                    participantId = 0,
                    chatId        = 0,
                    isAdmin       = true,
                    userAppId     = "10d3ed1e-ae7d-4d0c-80e0-aa360d76025b"
                },
                new participant {
                    participantId = 0,
                    chatId        = 0,
                    isAdmin       = false,
                    userAppId     = "127b0df2-d732-478e-bf84-0b673c48d145"
                }/*,
                  * new participant {
                  * participantId = 0,
                  * chatId = 0,
                  * isAdmin = false,
                  * userAppId = "3982349d-289d-4f3a-ab29-f3f6bb3893f4"
                  * },*/
            };

            MutationCreateChatTxn_Input input = new MutationCreateChatTxn_Input
            {
                chat = new chat
                {
                    chatId       = 0,
                    name         = "Chat 1",
                    companyId    = "04c6b67c-6f4d-455f-a472-d6206dd769df",
                    participants = participants
                },
                url   = "http://10.18.24.67:8082/",
                token = "token"
            };

            MutationCreateChatTxn_Output output = await new MutationCreateChatTxn().Execute(input: input);

            Assert.That(output, Is.Not.Null);
            Assert.That(output.ResultConfirmation.resultPassed, Is.True);
            Assert.That(output.chat, Is.Not.Null);
            Assert.That(output.chat.chatId, Is.GreaterThan(0));
        }
예제 #4
0
        public async Task <MutationCreateChatTxn_Output> MutationCreateChatTxn(MutationCreateChatTxn_Input input)
        {
            MutationCreateChatTxn_Output output = await new MutationCreateChatTxn().Execute(input: input);

            return(output);
        }