private static void TestModelValidation(StubValidationBroadcastModel model, double p1 = 1, double p2 =1, double p3 =1) { try { double x = CalculatePathLoss(model, p1, p2, p3); } catch (Exception e) { if (e is ArgumentOutOfRangeException) { Assert.AreEqual(1, 1, "exception!"); } return; } Assert.AreEqual(0, 1, "The validation is invalid!"); }
private static void TestModelValidation(StubValidationBroadcastModel model, double p1 = 1, double p2 = 1, double p3 = 1) { try { double x = CalculatePathLoss(model, p1, p2, p3); } catch (Exception e) { if (e is ArgumentOutOfRangeException) { Assert.AreEqual(1, 1, "exception!"); } return; } Assert.AreEqual(0, 1, "The validation is invalid!"); }
private static double CalculatePathLoss(StubValidationBroadcastModel model, double distanceInKilometer, double baseHeight, double mobileHeight = 1.5) { return model.CalculatePathLoss(distanceInKilometer, baseHeight, mobileHeight); }
public void TestInitialize() { model = new StubValidationBroadcastModel(); }
private static double CalculatePathLoss(StubValidationBroadcastModel model, double distanceInKilometer, double baseHeight, double mobileHeight = 1.5) { return(model.CalculatePathLoss(distanceInKilometer, baseHeight, mobileHeight)); }