Esempio n. 1
0
        public async Task sync_invoke_test()
        {
            using var currentFile   = File.OpenText($"JObjectTests/hydrated.json");
            using var currentReader = new JsonTextReader(currentFile);
            var current = (JObject)JToken.ReadFrom(currentReader);

            var wi = new WorkItem("fourover/guid/hydratedproduct/guid")
            {
                Action     = Action.Create,
                ClientId   = "clientid",
                RecordType = RecordType.HydratedProduct,
                Current    = current["Model"] as JObject,
                Token      = current["Token"].ToString()
            };

            try
            {
                var test = await _command.Dispatch(wi);
            }
            catch (Exception ex)
            {
                Assert.Fail(ex.Message);
            }
        }