public void TestConstructorsCorrectlySetProperties() { XboxRemoteParty remoteParty = new XboxRemoteParty(this.xboxConsole, TestPartyId); Assert.AreSame(this.xboxConsole, remoteParty.Console); Assert.AreEqual(TestPartyId, remoteParty.PartyId); remoteParty = XboxRemoteParty.FromPartyId(this.xboxConsole, TestPartyId); Assert.AreSame(this.xboxConsole, remoteParty.Console); Assert.AreEqual(TestPartyId, remoteParty.PartyId); }
public void TestDeclineInviteToPartyInvokesAdapterDeclineInviteToParty() { bool isCorrectMethodCalled = false; ShimXboxConsoleAdapterBase.AllInstances.DeclineInviteToPartyStringStringString = (adapter, systemIp, actingUserXuid, partyId) => { isCorrectMethodCalled = true; Assert.AreEqual(TestXuidString, actingUserXuid); Assert.AreEqual(TestPartyId, partyId); }; this.CreateTestUser().DeclineInviteToParty(XboxRemoteParty.FromPartyId(this.xboxConsole, TestPartyId)); Assert.IsTrue(isCorrectMethodCalled, "XboxUser method did not call the correct Adapter method."); }