public void ValidateCancel() { SelfDistributable selfDistributable = new CommandApp(); try { selfDistributable.Distribute = new Locally(); selfDistributable.Cancel(); ApplicationLog.WriteLine("SelfDistributable BVT: SelfDistributable Cancel Validated successfully"); } catch (Exception ex) { ApplicationLog.WriteLine(string.Format((IFormatProvider)null, "SelfDistributable BVT: SelfDistributable Cancel Validated successfully:", ex.Message)); Assert.Fail("SelfDistributable BVT: SelfDistributable Cancel Not validated successfully"); } }