protected static Mock <ComponentInterface> CreateInterface(int interfaceNameValue) { var interfaceMock = new Mock <ComponentInterface>(); interfaceMock.SetupGet(x => x.Id).Returns(Guid.NewGuid()); interfaceMock.Setup(x => x.Name).Returns(NamesGenerator.ComponentInterfaceName(interfaceNameValue)); return(interfaceMock); }
public void Constructor_Called_CanCreateComponentInterface() { //Arrange var name = NamesGenerator.ComponentInterfaceName(); var componentInterface = new ComponentInterface(name); //Assert Assert.That(componentInterface.Name, Is.EqualTo(name)); }
private static List <ComponentInterface> CreateSlots() { var slotsToInsert = new List <ComponentInterface>(); for (var i = 0; i < 5; i++) { slotsToInsert.Add(new ComponentInterface(NamesGenerator.ComponentInterfaceName(i))); } return(slotsToInsert); }
public void Map_ComponentInterfaceVO() { var from = new ComponentInterfaceVO { Id = Guid.NewGuid(), Name = NamesGenerator.ComponentInterfaceName() }; var to = Mapper.Map <ComponentInterfaceModel>(from); AssertAllPropertiesSet(from, to); AssertLinksSet(to); }
private static ComponentInterfaceVO CreateInterfaceVO() { return(new ComponentInterfaceVO { Name = NamesGenerator.ComponentInterfaceName() }); }