GetSchemas() public method

Return schema information for all the event collections in this project.
public GetSchemas ( ) : Newtonsoft.Json.Linq.JArray
return Newtonsoft.Json.Linq.JArray
Exemplo n.º 1
0
        public void GetCollectionSchemas_Success()
        {
            var client = new KeenClient(SettingsEnv);

            var expected = new JArray(); // todo: better mock return
            if (UseMocks)
            {
                var eventMock = new Mock<IEvent>();
                eventMock.Setup(m => m.GetSchemas())
                  .Returns(Task.FromResult(expected));

                client.Event = eventMock.Object;
            }

            var reply = client.GetSchemas();
            Assert.NotNull(reply);
        }