public void Test4() { int a = 10; int b = ToTest.testMethod(); Assert.Equal(a, b); }
public override void FindPathRecursive() { base.FindPathRecursive(); if (nextWaypoint is Corner) { targetCornerIndex = corners.IndexOf((Corner)nextWaypoint); } if (stations.Contains(target)) { target.nextWaypoint = this; target.FindPathRecursive(); return; } for (int i = 0; i < corners.Count; i++) { if (corners[i] != nextWaypoint && !corners[i].visited) { corners[i].nextWaypoint = this; ToTest.Enqueue(corners[i]); } } if (ToTest.Count > 0) { ToTest.Dequeue().FindPathRecursive(); } }
public void SetUp() { _instance = new ToTest(); _instance.InputDataStore(1, "1"); _instance.InputDataStore(2, "2"); _instance.InputDataStore(3, "3"); _instance.InputDataStore(4, "4"); }
public void TestWithStub() { var dependecyStub = new DependencyTest(); var toTest = new ToTest(); toTest.Foo(dependecyStub); Assert.AreEqual(23, toTest.Xa); }
public void Test_MethodC() { var mocks = new MockRepository(); ToTest testedObject = mocks.CreateMock <ToTest>(); testedObject.Expect(t => t.MethodA()).Return("AString"); testedObject.Expect(t => t.MethodB()).Return(1324); Assert.AreEqual("AString 1324", testedObject.MethodC()); }
public static void Main() { ToTest testing = ToTest.Interop; switch (testing) { case ToTest.Interop: run(new InteropTest()); break; } Console.ReadLine(); }
public void TestWithMoq() { var dependecyMock = new Mock <IDependency>(); dependecyMock.Setup(d => d.A).Returns(23); var toTest = new ToTest(); toTest.Foo(dependecyMock.Object); Assert.AreEqual(23, toTest.Xa); dependecyMock.Verify(d => d.A, Times.Once); }
public override void FindPathRecursive() { base.FindPathRecursive(); foreach (Corridor corridor in corridors) { if (corridor != nextWaypoint && !corridor.visited) { corridor.nextWaypoint = this; ToTest.Enqueue(corridor); } } if (ToTest.Count > 0) { ToTest.Dequeue().FindPathRecursive(); } }
public LogicTest() { toTest = new ToTest(); }