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); }
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); }