Ejemplo n.º 1
0
        public void DigitalWatchShouldOverrideToString()
        {
            DigitalWatch digitalWatch = new DigitalWatch {
                WatchId = 2111, BrandName = "TITAN", StrapType = "METALIC", StrapColor = "BLACK", Segment = "BASIC", Price = 8000, DisplayMode = "24Hour", HasBackLight = true
            };
            var actual = digitalWatch.ToString();

            Assert.AreEqual(string.Format("Model Id: 2111, Brand: TITAN, Segment: BASIC, Strap Type: METALIC, Strap Color: BLACK, Price: 8000, Watch Type: DigitalWatch, DisplayMode: 24Hour, BackLight: True "), actual);
        }
Ejemplo n.º 2
0
        public void DigitalModelIsValid()
        {
            DigitalWatch digitalWatch = new DigitalWatch();

            Assert.That(digitalWatch, Has.Property("WatchId"));
            Assert.That(digitalWatch, Has.Property("BrandName"));
            Assert.That(digitalWatch, Has.Property("StrapType"));
            Assert.That(digitalWatch, Has.Property("StrapColor"));
            Assert.That(digitalWatch, Has.Property("Segment"));
            Assert.That(digitalWatch, Has.Property("Price"));
            Assert.That(digitalWatch, Has.Property("DisplayMode"));
            Assert.That(digitalWatch, Has.Property("HasBackLight"));
            Assert.That(digitalWatch, Is.AssignableTo(typeof(DigitalWatch)));
        }
Ejemplo n.º 3
0
        public void DigitalShouldBeWatchType()
        {
            DigitalWatch digital = new DigitalWatch();

            Assert.IsInstanceOf <Watch>(digital);
        }