Exemplo n.º 1
0
        public void TestMethod1()
        {
            Form1 f1         = new Form1();
            var   fakeDevice = new TestBeeper();

            f1.MachLaut(70, fakeDevice);

            Assert.AreEqual(2, fakeDevice.CallCount);
        }
Exemplo n.º 2
0
        public void MyTestMethod()
        {
            Form1 f1         = new Form1();
            var   fakeDevice = new TestBeeper();

            Assert.ThrowsException <ArgumentException>(() => f1.MachLaut(49, fakeDevice));
            Assert.ThrowsException <ArgumentException>(() => f1.MachLaut(50, fakeDevice));
            f1.MachLaut(51, fakeDevice);
        }