コード例 #1
0
        public void ItSetsTheTestToTheDefaultValueIfThereIsOne()
        {
            var builder = new EmptyPromptBuilder();

            var promptInfo = A.PromptInfo()
                .WithDefaultValues(A.ObservableCollection(A.DefaultValue().WithValue("Value").Build()))
                .Build();

            var prompt = (EmptyPrompt)builder.BuildFrom(promptInfo);
            Assert.AreEqual(promptInfo.DefaultValues.Single().Value, prompt.Text);
        }
コード例 #2
0
        public void ItDoesNotSetTheTextIfTheDefaultsAreNull()
        {
            var builder = new EmptyPromptBuilder();

            var promptInfo = A.PromptInfo()
                .WithDefaultValues(null)
                .Build();

            var prompt = (EmptyPrompt)builder.BuildFrom(promptInfo);
            Assert.AreEqual(null, prompt.Text);
        }