public void ServerRoomManageReady() { MvsAServer t = new MvsAServer(socket, end, dataLenght, 4, 3); t.CreateRoom(); Assert.That(t.rooms[0].ManageReady(dataLenght), Is.EqualTo(false)); }
public void ServerJoinRoom() { MvsAServer t = new MvsAServer(socket, end, dataLenght, 4, 3); t.CreateRoom(); Assert.That(t.JoinRoom(0, 0), Is.EqualTo(true)); }
public void ServerRoomManageRoomEnter() { MvsAServer t = new MvsAServer(socket, end, dataLenght, 4, 3); t.CreateRoom(); t.rooms[0].ManageEnterRoom(dataLenght); Assert.That(t.data[(int)PacketOffset.ANSWER], Is.EqualTo((int)PacketType.REQUEST)); }
public void ServerRoomReceiveRequest() { MvsAServer t = new MvsAServer(socket, end, dataLenght, 4, 3); t.CreateRoom(); t.data[(int)PacketOffset.ANSWER] = (byte)PacketType.REQUEST; Assert.That(t.rooms[0].Receive(dataLenght, 0), Is.EqualTo((int)PacketType.REQUEST)); }
public void ServerRoomAdd() { MvsAServer t = new MvsAServer(socket, end, dataLenght, 4, 3); t.CreateRoom(); t.rooms[0].Add(end); Assert.That(t.rooms[0].membersCount, Is.EqualTo(1)); }
public void ServerRoomControlStartMatch() { MvsAServer t = new MvsAServer(socket, end, dataLenght, 4, 3); t.CreateRoom(); t.rooms[0].Add(end); Assert.That(t.rooms[0].ControlStartMatch(0), Is.EqualTo(false)); }
public void ServerRoomManageReadySetMember() { MvsAServer t = new MvsAServer(socket, end, dataLenght, 4, 3); t.CreateRoom(); t.rooms[0].Add(end); Assert.That(t.rooms[0].ManageCharacterSelection(dataLenght), Is.EqualTo(true)); }
public void ServerRoomSendReliableAll() { MvsAServer t = new MvsAServer(socket, end, dataLenght, 4, 3); t.CreateRoom(); t.rooms[0].SendAllReliable(new byte[dataLenght], dataLenght, (int)Command.ENTERROOM); Assert.That(t.rooms[0].reliablePackets.Count, Is.EqualTo(t.rooms[0].membersCount)); }
public void ServerRoomManageReady() { MvsAServer t = new MvsAServer(socket, end, dataLenght, 4, 3); t.CreateRoom(); t.data = new byte[t.minPacketSize]; Assert.That(t.rooms[0].ManageCharacterSelection(dataLenght), Is.EqualTo(false)); }
public void ServerRoomSendReliable() { MvsAServer t = new MvsAServer(socket, end, dataLenght, 4, 3); t.CreateRoom(); t.rooms[0].SendReliable(end, new byte[dataLenght], dataLenght); Assert.That(t.rooms[0].reliablePackets.Count, Is.EqualTo(1)); }
public void ServerRoomReceive() { MvsAServer t = new MvsAServer(socket, end, dataLenght, 4, 3); t.CreateRoom(); t.data[(int)PacketOffset.ANSWER] = 3; Assert.That(t.rooms[0].Receive(dataLenght, 0), Is.EqualTo(-1)); }
public void ServerRoomContains() { MvsAServer t = new MvsAServer(socket, end, dataLenght, 4, 3); t.CreateRoom(); t.rooms[0].Add(end); Assert.That(t.rooms[0].Contains(end), Is.EqualTo(true)); }
public void ServerRoomGetMemberEndPoint() { MvsAServer t = new MvsAServer(socket, end, dataLenght, 4, 3); t.CreateRoom(); t.rooms[0].Add(end); Assert.That(t.rooms[0].GetMemberEndPoint(0), Is.EqualTo(end)); }
public void ServerRoomStartMatchOffset() { MvsAServer t = new MvsAServer(socket, end, dataLenght, 4, 3); t.CreateRoom(); t.data[(int)PacketOffset.ANSWER] = (byte)PacketType.ANSWER; t.rooms[0].StartMatch(dataLenght); Assert.That(t.data[(int)PacketOffset.ANSWER], Is.EqualTo((int)PacketType.REQUEST)); }
public void ServerRoomManageTransform() { MvsAServer t = new MvsAServer(socket, end, dataLenght, 4, 3); t.CreateRoom(); t.rooms[0].Add(end); t.rooms[0].ManageTransform(0); Assert.That(t.rooms[0].reliablePackets.Count, Is.EqualTo(t.rooms[0].membersCount - 1)); }
public void ServerRoomControlStartMatchAllReady() { MvsAServer t = new MvsAServer(socket, end, dataLenght, 4, 3); t.CreateRoom(); t.rooms[0].Add(end); t.rooms[0].members[0].CurrentState = State.READY; Assert.That(t.rooms[0].ControlStartMatch(0), Is.EqualTo(true)); }
public void ServerRoomManageReadySetMemberReady() { MvsAServer t = new MvsAServer(socket, end, dataLenght, 4, 3); t.CreateRoom(); t.rooms[0].Add(end); t.rooms[0].members[0].CurrentState = State.READY; Assert.That(t.rooms[0].ManageCharacterSelection(dataLenght), Is.EqualTo(false)); }
public void ServerRoomTransformOffset() { MvsAServer t = new MvsAServer(socket, end, dataLenght, 4, 3); t.CreateRoom(); t.data[(int)PacketOffset.ANSWER] = (byte)PacketType.REQUEST; t.rooms[0].ManageTransform(dataLenght); Assert.That(t.data[(int)PacketOffset.ANSWER], Is.EqualTo((int)PacketType.ANSWER)); }
public void ServerRoomManageAnswer() { MvsAServer t = new MvsAServer(socket, end, dataLenght, 4, 3); t.CreateRoom(); Room.ReliablePacket p = new Room.ReliablePacket(); p.command = (int)Command.CHARACTERSELECTION; p.end = t.CurrentEndPoint; t.rooms[0].reliablePackets.Add(p); t.rooms[0].ManageAnswer((int)Command.CHARACTERSELECTION); Assert.That(t.rooms[0].reliablePackets.Count, Is.EqualTo(0)); }