File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
RubberduckTests/SourceControl Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -975,6 +975,22 @@ public void OnBrowseDefaultRepoLocation_WhenUserCancels_LocalDirectoryDoesNotCha
975
975
Assert . AreEqual ( originalPath , _vm . LocalDirectory ) ;
976
976
}
977
977
978
+ [ TestMethod ]
979
+ public void NullProject_DisplaysError ( )
980
+ {
981
+ //arrange
982
+ SetupValidVbProject ( ) ;
983
+ SetupVM ( ) ;
984
+ _vbe . Setup ( v => v . ActiveVBProject ) . Returns ( ( VBProject ) null ) ;
985
+ _vbe . Setup ( v => v . VBProjects ) . Returns ( new Mock < VBProjects > ( ) . Object ) ;
986
+
987
+ //act
988
+ _vm . RefreshCommand . Execute ( null ) ;
989
+
990
+ //assert
991
+ Assert . IsTrue ( _vm . DisplayErrorMessageGrid , "Null ActiveProject did not raise error." ) ;
992
+ }
993
+
978
994
private const string DummyRepoId = "SourceControlTest" ;
979
995
980
996
private SourceControlSettings GetDummyConfig ( )
You can’t perform that action at this time.
0 commit comments