private async Task <Room> CreateRoom() { using var api = new RoomApiClient(BaseUri); var req = new CreateRoomRequest { ApplicationName = ApplicationName, Version = Version, Password = Password, MaxUser = MaxUser, }; return(await api.CreateRoomAsync(req)); }
public async Task CreateRoom() { using (var api = new RoomApiClient(BaseUri)) { var req = new CreateRoomRequest { ApplicationName = ApplicationName, Version = Version, Password = Password, MaxUser = MaxUser, }; var room = await api.CreateRoomAsync(req); Assert.AreEqual(ApplicationName, room.ApplicationName); Assert.AreEqual(Version, room.Version); Assert.AreEqual(Password, room.Password); Assert.AreEqual(MaxUser, room.MaxUser); Assert.AreEqual(!string.IsNullOrEmpty(req.Password), room.RequirePassword); } }