public void ItShouldReturnTrueForExitCountry() { const string country = "us"; var server = new LogicalServerContract { ExitCountry = country }; var spec = new ExitCountryServer(country); spec.IsSatisfiedBy(server).Should().BeTrue(); }
private Specification <LogicalServerContract> ProfileServerSpec(Profile profile) { if (profile.ProfileType == ProfileType.Custom) { return(new ServerById(profile.ServerId)); } Specification <LogicalServerContract> spec = new ServerByFeatures(ServerFeatures(profile)); if (!string.IsNullOrEmpty(profile.CountryCode)) { spec &= new ExitCountryServer(profile.CountryCode); } return(spec); }