private static void Main() { var cmd = new SampleCommand(); cmd.Run(); cmd.Run(); cmd.Run(); }
public void SampleCommand_Run_Fails_If_No_Document_Open() { JustMock.Arrange(() => _externalCommandData.Application).Returns(_uiApplication); JustMock.Arrange(() => _uiApplication.ActiveUIDocument).Returns((UIDocument)null); var result = _emptySampleCommand.Run(_externalCommandData); Assert.NotNull(result); Assert.Equal(ResultEnum.Failed, result.RvtResult); Assert.Equal("No active document is open", result.Message); }