Пример #1
0
        public void TestCredentialMapping_Deserialization()
        {
            Uri uri      = new Uri("https://zzz.blob.core.windows.net/");
            var fileText = NetworkTools.DownloadTextFile(uri);
            var repo     = NetworkTools.DeserializeJson <CompositeDeviceConfiguration>(fileText);

            Assert.IsNotNull(repo, "Should not be null");
            Assert.AreEqual(2, repo.Devices.Count, "Mismated # of mappings");
            var compare1 = SameDevice(repo.Devices[0], "deviceidt001", "zzz", "localdevice001");

            Assert.IsTrue(compare1, "Device 1 mismatch");

            var compare2 = SameDevice(repo.Devices[1], "deviceidt002", "zzz", "localdevice002");

            Assert.IsTrue(compare2, "Device 2 mismatch");
        }