Пример #1
0
 public ViewModel()
 {
     Provider = new Provider();
     Messages = new ObservableCollection<Core.Message>();
     ActivateCommands();
     SendRequests();
 }
Пример #2
0
        public void broadcast_carrier_message()
        {
            // Setup
            var carrier = new Provider();
            var observer = new Observer();

            // Test
            carrier.Send(new Message(carrier.Id, new List<string> { observer.Id }, SOME_TEXT));

            // Verify
            var expected = observer.Messages.Count == 1;
            Assert.IsTrue(expected);
        }
Пример #3
0
        public void carrier_broadcasts_location()
        {
            // Setup
            var provider = new Provider();

            // Test
            provider.BroadcastLocation();

            // Verify
            var location = provider.Location;
            var expected = location.Latitude > 0 && location.Longitude > 0;

            Assert.IsTrue(expected);
        }