Ejemplo n.º 1
0
            public void Cloner_Clone_Param_ReturnNoRow(int id)
            {
                var row    = Make.Row("color", "id", id);
                var clones = _executionPlanBuilder.Append(row, true).Compile().Execute();

                Assert.Equal(0, clones.Results.Count);
            }
Ejemplo n.º 2
0
            public void QueryDispatcher_GetQueryHelper_CalledWithIntegerReturnData()
            {
                var row    = Make.Row("color", "id", 1);
                var result = _queryDispatcher.GetQueryHelper(0).Select(row);

                _queryDispatcher.Received().GetQueryHelper(row.ServerId);
                _queryHelper.Received().Select(row);

                Assert.Equal(Make.Obj(1, "orange"), result);
            }
Ejemplo n.º 3
0
        internal static IQueryHelper CreateData()
        {
            var db = Substitute.For <IQueryHelper>();

            db.Select(Make.Row("color", "id", 1)).Returns(Make.Obj(1, "orange"));
            db.Select(Make.Row("person", "id", 1)).Returns(Make.Obj(1, "joe", 1, 1));
            db.Select(Make.Row("country", "id", 1)).Returns(Make.Obj(1));
            db.Select(Make.Row("state", "id", 1)).Returns(Make.Obj(1));
            db.Select(Make.Row("city", "id", 1)).Returns(Make.Obj(1));
            db.Select(Make.Row("house", "id", 1)).Returns(Make.Obj(1));

            return(db);
        }