public void Verify_parameters_at_focus() { var parameters = new MockedParameters(); var cmd = new Mock<IDbCommand>(); cmd.Setup(x => x.CreateParameter()).Returns(() => new MockedParameter()); cmd.Setup(x => x.ExecuteReader()).Returns(Mock.Of<IDataReader>()); cmd.Setup(x => x.Parameters).Returns(parameters); var sessionManager = new Mock<ISessionManager>(); sessionManager.SetupUoWCreateCommand(cmd.Object); var mgr = DataAccessClasses.SolarSystems(sessionManager.Object); var systems = mgr.FindSystemsInLocalArea(new LocalAreaView(new Coordinates { X = 0, Y = 0, Z = 0 }, new ScreenSize(5, 5))); cmd.Object.AssertParameter("MinX", -2) .AssertParameter("MaxX", 2) .AssertParameter("MinY", -2) .AssertParameter("MaxY", 2) .AssertParameter("Z", 0); }