<?xml version="1.0" encoding="UTF-8"?> <TestSettings name="Local" id="217d9f83-a42a-48a9-aa24-3860a5b13575" xmlns="http://microsoft.com/schemas/VisualStudio/TeamTest/2010"> <Description>These are default test settings for a local test run.</Description> <Deployment enabled="false" /> <Execution> <TestTypeSpecific /> <AgentRule name="Execution Agents"> </AgentRule> <ExecutionThread apartmentState="MTA" /> </Execution> </TestSettings>
[TestClass()] public class TestRunInitialize { [AssemblyInitialize()] public static void Initialize(TestContext testContext) { InitializeLicense(); } private static LicenseInitializer m_AOLicenseInitializer = new LicenseInitializer(); private static void InitializeLicense() { m_AOLicenseInitializer.InitializeApplication(new esriLicenseProductCode[] { esriLicenseProductCode.esriLicenseProductCodeArcServer, esriLicenseProductCode.esriLicenseProductCodeStandard, esriLicenseProductCode.esriLicenseProductCodeAdvanced}, new esriLicenseExtensionCode[] { }); } }
[TestMethod()] public void GenerateNewPlotDocument_ProperlySetsQuadid () { PlotDocumentGeneratorClass plotter = new PlotDocumentGeneratorClass(); plotter.GenerateNewPlotDocument("449a"); Assert.AreEqual("449a", plotter.quadid); } [TestMethod()] public void CheckLayoutView_ReturnsIFeatureWorkspaceType () { MockRepository mockrepo = new MockRepository(); IPlotDocument plotter = mockrepo.DynamicMock<PlotDocumentGeneratorClass>(); IFeatureWorkspace transworkspace = plotter.SetCurrentWorkspace(); Assert.IsInstanceOfType(transworkspace, typeof(ESRI.ArcGIS.Geodatabase.IFeatureWorkspace)); } [TestMethod()] public void GetEditor_MockingTest () { MockRepository mockrepo = new MockRepository(); PlotDocumentGeneratorClass plotter = new PlotDocumentGeneratorClass(); UID test = mockrepo.StrictMock<UID>(); Assert.IsNotNull(test); }
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.