public void BeaconCanConstruct() { WebC2 beacon = null; try { // Instantiate a configured beacon beacon = new WebC2(_url); // Check that the channels were instaniated Assert.IsInstanceOfType(beacon.BeaconChannel, typeof(BeaconChannel)); Assert.IsInstanceOfType(beacon.ServerChannel, typeof(WebChannel)); // Check that the property values are correct Assert.IsNotNull(beacon.UrlEndpoint); Assert.AreEqual(_url, beacon.UrlEndpoint); } catch (Exception ex) { Console.WriteLine($"Failed: {ex.Message}"); Assert.Fail(); } finally { // Test specific clean up if (beacon != null && beacon.Started) { beacon.Stop(); } } }
public void Setup() { _beacon = new WebC2(); }