//[TestMethod, TestCategory("Integration")] //[DeploymentItem(@"testdata\LateboundConstantsGeneratorConfiguration.xml")] public void GenerateConstants_Should_GenerateConstantsFileClass() { // Arrange var lcgHelper = new LCGHelper(); lcgHelper.LoadSettingsFromFile("LateboundConstantsGeneratorConfiguration.xml"); var filename = $"constants_{Guid.NewGuid()}.cs"; var credentials = new CrmCredentials { Domain = "MyDomain", OrgUnit = "MyOrganizationUnit", ServerName = "MyServerName", Password = "******", Protocol = CrmCredentials.protocol.https, User = "******" }; lcgHelper.ConnectCrm(credentials); // Act lcgHelper.GenerateConstants(); // Assert Assert.IsTrue(File.Exists(Path.Combine(lcgHelper.Settings.OutputFolder, lcgHelper.Settings.CommonFile + ".cs"))); }
//[TestMethod, TestCategory("Integration")] //[DeploymentItem(@"testdata\LateboundConstantsGeneratorConfiguration.xml")] public void GenerateConstants_usingConnectionString_Should_GenerateConstantsFileClass() { // Arrange var lcgHelper = new LCGHelper(); lcgHelper.LoadSettingsFromFile("LateboundConstantsGeneratorConfiguration.xml"); var filename = $"constants_{Guid.NewGuid()}.cs"; var connectionString = $"MyCrmConnectionString"; lcgHelper.ConnectCrm(connectionString); // Act lcgHelper.GenerateConstants(); // Assert Assert.IsTrue(File.Exists(Path.Combine(lcgHelper.Settings.OutputFolder, lcgHelper.Settings.CommonFile + ".cs"))); }