/*************************************************************************** Copyright (c) Microsoft Corporation. All rights reserved. This code is licensed under the Visual Studio SDK license terms. THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT. ***************************************************************************/ using System; using System.Collections; using System.Text; using System.Reflection; using Microsoft.VsSDK.UnitTestLibrary; using Microsoft.VisualStudio.Shell.Interop; using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VSSDK.Tools.VsIdeTesting; using VitaliiGanzha.VSPackageInstall; namespace VSPackageInstall_UnitTests.MyToolWindowTest { /// ///This is a test class for MyToolWindowTest and is intended ///to contain all MyToolWindowTest Unit Tests /// [TestClass()] public class MyToolWindowTest { /// ///MyToolWindow Constructor test /// [TestMethod()] public void MyToolWindowConstructorTest() { MyToolWindow target = new MyToolWindow(); Assert.IsNotNull(target, "Failed to create an instance of MyToolWindow"); MethodInfo method = target.GetType().GetMethod("get_Content", BindingFlags.Public | BindingFlags.Instance); Assert.IsNotNull(method.Invoke(target, null), "MyControl object was not instantiated"); } /// ///Verify the Content property is valid. /// [TestMethod()] public void WindowPropertyTest() { MyToolWindow target = new MyToolWindow(); Assert.IsNotNull(target.Content, "Content property was null"); } } }