public async Task InitWithKeylessAnonUserAddsKey() { // Note, we don't care about polling mode vs. streaming mode for this functionality. var mockDeviceInfo = new MockDeviceInfo("fake-device-id"); var config = BasicConfig().DeviceInfo(mockDeviceInfo).Persistence(Components.NoPersistence).Build(); using (var client = await TestUtil.CreateClientAsync(config, KeylessAnonUser)) { Assert.Equal("fake-device-id", client.User.Key); AssertHelpers.UsersEqualExcludingAutoProperties( User.Builder(KeylessAnonUser).Key(client.User.Key).Build(), client.User); } }
public async Task IdentifyWithKeylessAnonUserAddsKey() { var mockDeviceInfo = new MockDeviceInfo("fake-device-id"); var config = BasicConfig().DeviceInfo(mockDeviceInfo).Persistence(Components.NoPersistence).Build(); using (var client = await TestUtil.CreateClientAsync(config, BasicUser)) { await client.IdentifyAsync(KeylessAnonUser); Assert.Equal("fake-device-id", client.User.Key); AssertHelpers.UsersEqualExcludingAutoProperties( User.Builder(KeylessAnonUser).Key(client.User.Key).Build(), client.User); } }