Esempio n. 1
0
        public void StatusPostBuilder_WithoutPowerOrConsumption_CannotBuild()
        {
            var builder = new StatusPostBuilder <IStatusPost>().SetTextMessage("Test");

            Assert.Throws <InvalidOperationException>(() =>
            {
                builder.Build();
            });
        }
Esempio n. 2
0
        public void StatusPostBuilder_AfterReset_HasNoStateLeft()
        {
            var         builder = new StatusPostBuilder <IStatusPost>().SetGeneration(1000, null).SetTimeStamp(DateTime.Now);
            IStatusPost status  = builder.Build();

            builder.Reset();

            Assert.That(builder._statusPost, Is.Not.SameAs(status));
        }