Example #1
0
        public void WhenUserInfoIsNull_ThenManagedByIsEmpty()
        {
            var authorization = new Mock <IAuthorization>();

            var viewModel = new UserFlyoutViewModel(
                authorization.Object,
                new CloudConsoleService());

            Assert.AreEqual("", viewModel.Email);
            Assert.AreEqual("", viewModel.ManagedBy);
        }
Example #2
0
        public void WhenHdIsNull_ThenManagedByIsEmpty()
        {
            var authorization = new Mock <IAuthorization>();

            authorization.SetupGet(a => a.Email)
            .Returns("*****@*****.**");
            authorization.SetupGet(a => a.UserInfo)
            .Returns(new UserInfo());

            var viewModel = new UserFlyoutViewModel(
                authorization.Object,
                new CloudConsoleService());

            Assert.AreEqual("*****@*****.**", viewModel.Email);
            Assert.AreEqual("", viewModel.ManagedBy);
        }