Exemple #1
0
        public void TestBeaconActionToString()
        {
            string       s            = "{\"Id\":1,\"Type\":3,\"eid\":\"uuid\",\"Subject\":\"Subject\",\"Body\":\"body\",\"Url\":\"http://sensorberg.com\",\"PayloadString\":\"{\\\"pay\\\":\\\"load\\\"}\"}";
            BeaconAction beaconAction = new BeaconAction();

            beaconAction.Body    = "body";
            beaconAction.Id      = 1;
            beaconAction.Payload = JsonObject.Parse("{\"pay\":\"load\"}");
            beaconAction.Subject = "Subject";
            beaconAction.Type    = BeaconActionType.InApp;
            beaconAction.Url     = "http://sensorberg.com";
            beaconAction.Uuid    = "uuid";

            string beaconString = FileStorageHelper.BeaconActionToString(beaconAction);

            Assert.AreEqual(s, beaconString);
        }