Ejemplo n.º 1
0
        public void OutputPostBuilder_AfterReset_HasNoStateLeft()
        {
            var         builder = new OutputPostBuilder().SetDate(DateTime.Today);
            IOutputPost output  = builder.Build();

            builder.Reset();

            Assert.That(builder.OutputPost, Is.Not.SameAs(output));
        }
Ejemplo n.º 2
0
        public void OutputPostBuilder_WithoutDate_CannotBuild()
        {
            var builder = new OutputPostBuilder().SetEnergyGenerated(10000);

            Assert.Throws <InvalidOperationException>(() =>
            {
                builder.Build();
            });
        }