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); }
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); }