Exemple #1
0
        public void TwoTimeStringExceptionTest([Values("", " ", "0.00004", null)] string prm1)
        {
            ForPrivate forPrivate = new ForPrivate();

            Assert.That(() =>
            {
                CommonModule.PrivateMethodInvoke(forPrivate, "TwoTimeString", new object[] { prm1 });
            },
                        Throws.TypeOf <InvalidCastException>());
        }
Exemple #2
0
        public void TwoTimeStringTest([Values("1", "4", "88", "-4", "0")] string prm1,
                                      [Values(2, 8, 176, -8, 0)] int Exp1)
        {
            ForPrivate forPrivate = new ForPrivate();

            Assert.That(forPrivate, Is.Not.Null);

            int act = (int)CommonModule.PrivateMethodInvoke(forPrivate, "TwoTimeString", new object[] { prm1 });

            Assert.That(act, Is.EqualTo(Exp1));
        }