Пример #1
0
 public PSLogger(XrmCommandBase xrmCmdlet)
 {
     XrmCmdlet = xrmCmdlet;
     XrmCmdlet.WriteVerbose(string.Format("PS Version: {0}", GetPSVersion().ToString()));
     if (GetPSVersion().Major < 5)
     {
         XrmCmdlet.WriteVerbose("Switching to Console.WriteLine instead of WriteInformation due to PS Version");
     }
 }
Пример #2
0
        public void Should_fail_when_using_default_implementation()
        {
            var ctx     = new XrmFakedContext();
            var service = ctx.GetOrganizationService();

            var result = new XrmCommandBase().Execute(service);

            Assert.False(result.Succeeded);
        }