public void TestAddNullAttribute_ThrowsArgumentException() { // Arrange string interfaceName = "IInterface"; SGInterface @interface = new SGInterface(interfaceName); // Act @interface = @interface.WithAttributes(null); }
public void TestAddAttributes_FluentAPI() { // Arrange string interfaceName = "IInterface"; SGInterface @interface = new SGInterface(interfaceName); string attr1Name = "Attr1"; string attr2Name = "Attr2"; SGAttribute attr1 = new SGAttribute(attr1Name); SGAttribute attr2 = new SGAttribute(attr2Name); // Act @interface = @interface.WithAttributes(attr1, attr2); // Assert Assert.IsTrue(@interface.Attributes.ContainsAll(attr1, attr2)); }