public void CheckServerInfoBuilder() { var director = new ServerInfoDirector(); var builder = new ServerInfoBuilder(); director.Builder = builder; director.BuildServerInfo(); Assert.IsType <ServerInfo>(builder.GetServerInfo()); }
public ServerInfo GetServerInfo() { ServerInfoDirector director = new ServerInfoDirector(); ServerInfoBuilder builder = new ServerInfoBuilder(); director.Builder = builder; director.BuildServerInfo(); return(builder.GetServerInfo()); }