Пример #1
0
        public void GetDataOrDefault_NullBody_ReturnsNull()
        {
            var response = new ClientResponse <ModelBase>()
            {
                Body = null
            };

            TestUKFastClient client = new TestUKFastClient(null);
            var result = client.GetDataOrDefault_Exposed(response);

            Assert.IsNull(result);
        }
Пример #2
0
        public void GetDataOrDefault_PopulatedBody_ReturnsBodyData()
        {
            var model    = new ModelBase();
            var response = new ClientResponse <ModelBase>()
            {
                Body = new ClientResponseBody <ModelBase>()
                {
                    Data = model
                }
            };

            TestUKFastClient client = new TestUKFastClient(null);
            var result = client.GetDataOrDefault_Exposed(response);

            Assert.AreEqual(model, result);
        }