public void ShouldNotDeploy_CSOM_SandboxSolution_WithDotsInFileName() { var hasException = false; var sandbox = ModelGeneratorService.GetRandomDefinition <SandboxSolutionDefinition>(def => { def.Activate = true; def.SolutionId = Guid.NewGuid(); def.FileName = string.Format("{0}.{1}.wsp", Rnd.String(4), Rnd.String(4)); }); try { var handler = new SPMeta2.CSOM.Standard.ModelHandlers.SandboxSolutionModelHandler(); handler.DeployModel(null, sandbox); } catch (Exception ex) { Assert.IsTrue(ex.GetType() == typeof(SPMeta2NotSupportedException)); Assert.IsTrue(ex.Message.Contains("SandboxSolutionDefinition.FileName")); hasException = true; } Assert.IsTrue(hasException); }
public void ShouldNotDeploy_CSOM_SandboxSolution_WithDotsInFileName() { var hasException = false; var sandbox = ModelGeneratorService.GetRandomDefinition<SandboxSolutionDefinition>(def => { def.Activate = true; def.SolutionId = Guid.NewGuid(); def.FileName = string.Format("{0}.{1}.wsp", Rnd.String(4), Rnd.String(4)); }); try { var handler = new SPMeta2.CSOM.Standard.ModelHandlers.SandboxSolutionModelHandler(); handler.DeployModel(null, sandbox); } catch (Exception ex) { Assert.IsTrue(ex.GetType() == typeof(SPMeta2NotSupportedException)); Assert.IsTrue(ex.Message.Contains("SandboxSolutionDefinition.FileName")); hasException = true; } Assert.IsTrue(hasException); }