Example #1
0
        public static void ClassInitialize(TestContext testContext)
        {
            Client = new AmazonIotDataClient("https://data.iot.us-east-1.amazonaws.com/");

            using (var iotClient = new AmazonIoTClient())
            {
                var things = iotClient.ListThings().Things;
                var firstThing = things.FirstOrDefault();
                if (firstThing == null)
                {
                    THING_NAME = "dotnettest" + DateTime.UtcNow.ToFileTime();
                    iotClient.CreateThing(new CreateThingRequest
                    {
                        ThingName = THING_NAME
                    });
                    CREATED_THING_NAME = THING_NAME;
                }
                else
                {
                    THING_NAME = firstThing.ThingName;
                }
            }
        }
Example #2
0
 public static void ClassInitialize(TestContext testContext)
 {
     Client = new AmazonIotDataClient("https://data.iot.us-east-1.amazonaws.com/");
 }