Пример #1
0
        private void GetNewUserSessionOwnedRoomsWithPrivacyTest(System.Action functionFinishedCallback)
        {
            Action <XmlDocument> getSessionOwnedRoomsServiceCallback = delegate(XmlDocument xmlResponse)
            {
                AssertNumberOfRoomsFromXml(0, xmlResponse);
                functionFinishedCallback();
            };

            RoomManagerServiceAPI.GetSessionOwnedRoomsWithPrivacyService(mTestAccountId, PrivacyLevel.Default, getSessionOwnedRoomsServiceCallback);
        }
Пример #2
0
        private void GetUserWithRoomsSessionOwnedRoomsWithPrivacyTest(System.Action functionFinishedCallback)
        {
            Action <XmlDocument> getSessionOwnedRoomsServiceCallbackPrivate = delegate(XmlDocument xmlResponse)
            {
                List <RoomProperties> roomsProperties = AssertNumberOfRoomsFromXml(1, xmlResponse);

                if (roomsProperties[0].RoomName != "test room" ||
                    roomsProperties[0].RoomType != RoomType.GreenScreenRoom ||
                    roomsProperties[0].RoomItemsXml.OuterXml != "<Items></Items>" ||
                    roomsProperties[0].RoomId != null ||
                    roomsProperties[0].PrivacyLevel != PrivacyLevel.Private ||
                    roomsProperties[0].AccountCreatingRoom != mTestAccountId)
                {
                    throw new System.Exception("We did not receive the expected results with this returned room.");
                }

                Action <XmlDocument> getSessionOwnedRoomsServiceCallbackPublic = delegate(XmlDocument xmlResponse2)
                {
                    AssertNumberOfRoomsFromXml(0, xmlResponse2);

                    Action <XmlDocument> getSessionOwnedRoomsServiceCallbackDefault = delegate(XmlDocument xmlResponse3)
                    {
                        List <RoomProperties> roomsProperties2 = AssertNumberOfRoomsFromXml(1, xmlResponse3);

                        if (roomsProperties2[0].RoomName != "test room" ||
                            roomsProperties2[0].RoomType != RoomType.GreenScreenRoom ||
                            roomsProperties2[0].RoomItemsXml.OuterXml != "<Items></Items>" ||
                            roomsProperties2[0].RoomId != null ||
                            roomsProperties2[0].PrivacyLevel != PrivacyLevel.Private ||
                            roomsProperties2[0].AccountCreatingRoom != mTestAccountId)
                        {
                            throw new System.Exception("We did not receive the expected results with this returned room.");
                        }

                        functionFinishedCallback();
                    };
                    //default should return us back all rooms regardless of privacy level
                    RoomManagerServiceAPI.GetSessionOwnedRoomsWithPrivacyService(mTestAccountId, PrivacyLevel.Default, getSessionOwnedRoomsServiceCallbackDefault);
                };

                RoomManagerServiceAPI.GetSessionOwnedRoomsWithPrivacyService(mTestAccountId, PrivacyLevel.Public, getSessionOwnedRoomsServiceCallbackPublic);
            };

            RoomManagerServiceAPI.GetSessionOwnedRoomsWithPrivacyService(mTestAccountId, PrivacyLevel.Private, getSessionOwnedRoomsServiceCallbackPrivate);
        }