public void GetLocationRepository_ApiIsInitialized_CreatesListRepository() { Rtm.Init("test", "test"); var actual = Rtm.GetLocationRepository(new AuthenticationToken()); Assert.IsInstanceOf <LocationRepository>(actual); }
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)); }
public void GetLocationRepostiory_ApiNotInitialized_ThrowsInvalidOperationException() { Assert.Throws <InvalidOperationException>(() => Rtm.GetLocationRepository(new AuthenticationToken())); }
public void GetLocationRepository_NullToken_ThrowsArgumentNullException() { Rtm.Init("test", "test"); Assert.Throws <ArgumentNullException>(() => Rtm.GetLocationRepository(null)); }