コード例 #1
0
 public void CustomCellLayoutWindowConstructorTest()
 {
     try
     {
         CustomCellLayoutWindow target = new CustomCellLayoutWindow();
     }
     catch (Exception)
     {
         return;
         //Console.WriteLine(e);
     }
     //Assert.Inconclusive("TODO: Implement code to verify target");
 }
コード例 #2
0
 public void CustomCellRowsTest()
 {
     try
     {
         CustomCellLayoutWindow target = new CustomCellLayoutWindow(); //
         int actual;
         actual = target.CustomCellRows;
         target.rowNumberLabel.Text = "8";
         actual = target.CustomCellRows;
         //   Assert.Inconclusive("Verify the correctness of this test method.");
     } catch (Exception) {
         return;
     }
 }
コード例 #3
0
 public void InitializeComponentTest()
 {
     try
     {
         CustomCellLayoutWindow target = new CustomCellLayoutWindow(); //
         target.InitializeComponent();
     }
     catch (Exception)
     {
         return;
         //Console.WriteLine(e);
     }
     //Assert.Inconclusive("A method that does not return a value cannot be verified.");
 }
コード例 #4
0
 public void MyHitTestResultTest()
 {
     try
     {
         CustomCellLayoutWindow target = new CustomCellLayoutWindow(); //
         HitTestResult          result = null;                         //
         //HitTestResultBehavior expected = new HitTestResultBehavior(); //
         HitTestResultBehavior actual;
         actual = target.MyHitTestResult(result);
     }
     catch (Exception)
     {
         return;
     }
     //Assert.AreEqual(expected, actual);
     //Assert.Inconclusive("Verify the correctness of this test method.");
 }
コード例 #5
0
        public void ApplySettingButtonClickTest()
        {
            try
            {
                PrivateType            type       = new PrivateType(typeof(CustomCellLayoutWindow));            //Class1为要测试的类。
                CustomCellLayoutWindow target     = new CustomCellLayoutWindow();
                PrivateObject          privateObj = new PrivateObject(target, type);

                //CustomCellLayoutWindow_Accessor target = new CustomCellLayoutWindow_Accessor(param0);                   //Class1_Accessor为自动生成的测试类
                //object sender = null; //
                //RoutedEventArgs e = null; //
                //target.ApplySettingButtonClick(sender, e);

                //target.rowNumberLabel.Text = "12";
                //target.columnNumberLabel.Text = "10";
                //target.ApplySettingButtonClick(sender, e);

                //target.rowNumberLabel.Text = "5";
                //target.columnNumberLabel.Text = "4";
                //target.ApplySettingButtonClick(sender, e);

                //Assert.Inconclusive("A method that does not return a value cannot be verified.");

                object          sender = null; //
                RoutedEventArgs e      = null; //
                object[]        myArgs = new object[] { sender, e };
                privateObj.Invoke("ApplySettingButtonClick", myArgs);

                target.rowNumberLabel.Text    = "12";
                target.columnNumberLabel.Text = "10";
                myArgs = new object[] { sender, e };
                privateObj.Invoke("ApplySettingButtonClick", myArgs);

                target.rowNumberLabel.Text    = "5";
                target.columnNumberLabel.Text = "4";
                myArgs = new object[] { sender, e };
                privateObj.Invoke("ApplySettingButtonClick", myArgs);
            }
            catch (Exception)
            {
                return;
                //Console.WriteLine(e);
            }
        }
コード例 #6
0
        public void EndHitTestFilterTest()
        {
            try
            {
                CustomCellLayoutWindow target = new CustomCellLayoutWindow(); //
                DependencyObject       o      = null;                         //
                //HitTestFilterBehavior expected = new HitTestFilterBehavior(); //
                HitTestFilterBehavior actual;
                actual = target.EndHitTestFilter(o);
                o      = new DependencyObject();
                actual = target.MyHitTestFilter(o);
            }
            catch (Exception)
            {
                return;
                //Console.WriteLine(e);
            }

            //Assert.AreEqual(expected, actual);
            //Assert.Inconclusive("Verify the correctness of this test method.");
        }
コード例 #7
0
        public void CustomCellLayoutTest()
        {
            try
            {
                PrivateType            type       = new PrivateType(typeof(CustomCellLayoutWindow));
                CustomCellLayoutWindow target     = new CustomCellLayoutWindow(); //
                PrivateObject          privateObj = new PrivateObject(target, type);

                //CustomCellLayoutWindow_Accessor target = new CustomCellLayoutWindow_Accessor(param0); //
                FilmLayout expected = null; //
                FilmLayout actual;
                //target.CustomCellLayout = expected;
                object[] myArgs = new object[] { expected };
                //privateObj.Invoke("CustomCellLayout", myArgs);
                actual = target.CustomCellLayout;
                Assert.AreEqual(expected, actual);
            }
            catch (Exception)
            {
                return;
            }
            //Assert.Inconclusive("Verify the correctness of this test method.");
        }