Esempio n. 1
0
        public void GetLocationRepository_ApiIsInitialized_CreatesListRepository()
        {
            Rtm.Init("test", "test");
            var actual = Rtm.GetLocationRepository(new AuthenticationToken());

            Assert.IsInstanceOf <LocationRepository>(actual);
        }
Esempio n. 2
0
        private static ILocationRepository InitLocationRepository()
        {
            // Load a user from JSON
            var userJson = File.ReadAllText("myRtmUser.json");
            var user     = Rtm.GetUserFactory().LoadFromJson(userJson);

            return(Rtm.GetLocationRepository(user.Token));
        }
Esempio n. 3
0
 public void GetLocationRepostiory_ApiNotInitialized_ThrowsInvalidOperationException()
 {
     Assert.Throws <InvalidOperationException>(() => Rtm.GetLocationRepository(new AuthenticationToken()));
 }
Esempio n. 4
0
 public void GetLocationRepository_NullToken_ThrowsArgumentNullException()
 {
     Rtm.Init("test", "test");
     Assert.Throws <ArgumentNullException>(() => Rtm.GetLocationRepository(null));
 }