public async Task UpdateProfileWhileProfileDoesNotExist()
        {
            var message =
                "{\"Id\":\"7ad3918c-bbcb-4e8a-af79-4219940c9be0\",\"DisplayName\":\"Roger\",\"Avatar\":\"Test.png\"}";
            var success = await _updateProfileHandler.Consume(message);

            Assert.False(success);
        }
Beispiel #2
0
        public async Task UpdateProfileWhileProfileExists()
        {
            var profile = TestProfile1;

            profile.DisplayName = "John Doe";

            var profileEvent = new ProfileEvent
            {
                Id = TestProfile1.Id, Avatar = TestProfile1.Avatar, DisplayName = "John Doe"
            };

            var success = await _updateProfileHandler.Consume(JsonConvert.SerializeObject(profileEvent));

            Assert.True(success);
            Assert.AreEqual("John Doe", TestProfile1.DisplayName);
        }