Example #1
0
        public void UserWithNullKeyWillHaveUniqueKeySet()
        {
            LdClient.Instance = null;
            var userWithNullKey = User.WithKey(null);
            var config          = StubbedConfigAndUserBuilder.Config(userWithNullKey, "someOtherAppKey");
            var client          = LdClient.Init(config, userWithNullKey);

            Assert.Equal(MockDeviceInfo.key, client.User.Key);
            LdClient.Instance = null;
        }
Example #2
0
        LdClient Client()
        {
            if (LdClient.Instance == null)
            {
                User user          = StubbedConfigAndUserBuilder.UserWithAllPropertiesFilledIn("user1Key");
                var  configuration = StubbedConfigAndUserBuilder.Config(user, appKey);
                return(LdClient.Init(configuration, user));
            }

            return(LdClient.Instance);
        }