public void WhenInitializeCalled_ResolutionTextProperty_ShouldContainProvidedUserName()
        {
            // Arrange
            const string UserName = "******";
            var vm = new ConcurrencyResolutionViewModel();

            // Act
            vm.Initialize(UserName);

            // Assert
            Assert.IsTrue(vm.ResolutionText.Contains(UserName));
        }
        public void ResolutionText_ShouldContainHighlightedUserName()
        {
            // Arrange
            const string HighlightOpenTag = "<b>";
            const string HighlightCloseTag = "</b>";
            var userName = Guid.NewGuid().ToString();
            var vm = new ConcurrencyResolutionViewModel();
            var expectedHighlightedText = string.Format("{0}{1}{2}", HighlightOpenTag, userName, HighlightCloseTag);

            // Act
            vm.Initialize(userName);

            // Assert
            Assert.IsTrue(vm.ResolutionText.Contains(expectedHighlightedText));
        }
        public void IfCanOverwriteIsFalseCannotExecuteOverwriteCommand()
        {
            // Arrange.
            var vm = new ConcurrencyResolutionViewModel();
            vm.Initialize("User");

            // Assert.
            Assert.IsTrue(vm.OverwriteCommand.CanExecute(null));

            // Act.
            vm.CanOverwrite = false;

            // Assert.
            Assert.IsFalse(vm.OverwriteCommand.CanExecute(null));
        }