public void NewUsernameIsNull_Throws()
 {
     var sub = new UserAccount();
     
     sub.ChangeUsername(null);
 }
            public void NameIsAssigned()
            {
                var ua = new UserAccount();
                ua.Username = "******";

                ua.ChangeUsername("foo");

                Assert.AreEqual("foo", ua.Username);
            }
            public void RaisesUsernameChangedEvent()
            {
                var ua = new UserAccount();

                ua.ChangeUsername("foo");

                IEventSource es = ua as IEventSource;
                Assert.IsTrue(es.Events.Any(x => x is UsernameChangedEvent));
            }