コード例 #1
0
        public void Update_Tenant_Id_Must_Equals()
        {
            var userId   = Guid.NewGuid();
            var tenantId = Guid.NewGuid();
            var blogUser = new BlogUser(new UserData(userId, "bob lee", "*****@*****.**", "lee", "bob", true,
                                                     "123456", true, tenantId));

            var userData = new UserData(userId, "lee bob", "*****@*****.**", "bob", "lee", false,
                                        "654321", false, Guid.NewGuid());

            Assert.Throws <ArgumentException>(() => blogUser.Update(userData));
        }
コード例 #2
0
        public void Update()
        {
            var userId   = Guid.NewGuid();
            var tenantId = Guid.NewGuid();
            var blogUser = new BlogUser(new UserData(userId, "bob lee", "*****@*****.**", "lee", "bob", true,
                                                     "123456", true, tenantId));
            var userData = new UserData(userId, "lee bob", "*****@*****.**", "bob", "lee", false,
                                        "654321", false, tenantId);

            blogUser.Update(userData);

            blogUser.Equals(new BlogUser(userData)).ShouldBeTrue();
        }