public void TestModelAccessors() { var expectedModel = "Test value"; // act var sut = new Gadget(expectedModel, new VideoPort[0]); var result = sut.Model; // assert Assert.AreEqual(expectedModel, result); }
public void TestTitleAccessors() { var sut = new Gadget(); var expectedTitle = "Test value"; // act sut.Title = expectedTitle; var result = sut.Title; // assert Assert.AreEqual(expectedTitle, result); }
public void TestDescriptionGetter() { var title = "Title"; var model = "Model"; var format = "{0} ||||||| {1}"; var expectedDescription = string.Format(format, title, model); // act var sut = new Gadget(model, new VideoPort[0]); sut.Title = title; var result = sut.GetDescription(format); // assert Assert.AreEqual(expectedDescription, result); }
public void TestVideoports() { // act var videoPort = new VideoPort { Name = "VGA" }; var sut = new Gadget("Model", new[] { videoPort, }); // assert Assert.AreEqual(sut.Videoports.Count, 1); Assert.AreEqual(sut.Videoports[0], videoPort); }