コード例 #1
0
 public void Ctor_ShouldThrowFullNameArgumentNullException(string fullName)
 {
     //Assert
     Assert.Throws <ArgumentNullException>(() =>
     {
         //Act
         ShortMethodInfoViewModel shortMethodInfoView = new ShortMethodInfoViewModel(fullName);
     });
 }
コード例 #2
0
        public void MethodCode_ShouldHaveExpectedValue()
        {
            //Arange
            string currentPath      = AppDomain.CurrentDomain.BaseDirectory;
            string testFileFullPath = Path.Combine(currentPath, @"Dialogs\ViewModels\TestData\TestMethodItem.xml");

            //Act
            ShortMethodInfoViewModel shortMethodInfoView = new ShortMethodInfoViewModel(testFileFullPath);

            //Assert
            Assert.AreEqual("return null;", shortMethodInfoView.MethodCode);
        }