public void TestXboxApplicationThrowsArgumentNullExceptionWithNullConsole() { #pragma warning disable 168 XboxApplication notUsed = new XboxApplication(this.xboxApplication.Definition, this.xboxPackage, null); Assert.IsNotNull(notUsed, "XboxApplication constructor succeded with a null console, and did not throw an ArgumentNullException as expected."); #pragma warning restore 168 }
public void TestInitialize() { this.shimsContext = ShimsContext.Create(); this.packageDefinition = new XboxPackageDefinition(PackageFullName, PackageFamilyName, Aumids); ShimXboxConsole.ConstructorIPAddress = (console, address) => { var myShim = new ShimXboxConsole(console) { AdapterGet = () => new StubXboxConsoleAdapterBase(null), SystemIpAddressGet = () => IPAddress.Parse(XboxApplicationTests.ConsoleAddress), XboxGamepadsGet = () => new List <GamesTest.Xbox.Input.XboxGamepad>() }; }; ShimXboxConsoleAdapterBase.ConstructorXboxXdkBase = (adapter, xboxXdk) => { }; this.xboxConsole = new XboxConsole((IPAddress)null); this.xboxPackage = new XboxPackage(this.packageDefinition, this.xboxConsole); this.xboxApplication = this.xboxPackage.Applications.First(); }