static void Main(string[] args) { try { var mockOK = new MExample { Run = RunType.SUCCESS, Arrange = true, Test = true, Assert = true }; var mockERROR = new MExample { Run = RunType.EXCEPTION, ExceptionExpected = new ExampleAlreadyExistsException("Mock ERROR"), Throws = true, Arrange = true, Test = true, Assert = true }; } catch (Exception e) { Console.WriteLine(e.Message); } }
public override void Run() { Msg("Example"); try { var module = new Example(); module.Str = "CODERUN_Example"; module.Int = 99; var idxStr = module.Add(module.Str); var idxInt = module.Add(module.Int.ToString()); var idxItem = module.Add("Item"); var str = module.Remove(idxItem); } catch { } Msg("HExample"); try { var host = new HExample(); } catch { } Msg("EExample"); try { var empty = new EExample(); } catch { } Msg("MExample"); try { var mock = new MExample { Run = IMock.RunType.SUCCESS, Arrange = IMock.RunType.SUCCESS, Test = IMock.RunType.SUCCESS, Assert = IMock.RunType.SUCCESS }; } catch { } }
static void Main(string[] args) { // Example try { var example = new Example(); example.Str = "APP-Example"; example.Int = 99; example.Add(example.Str); example.Add(example.Int.ToString()); foreach (var item in example.Repository) { Console.WriteLine(item); } } catch (Exception e) { Console.WriteLine(e.Message); } // HExample try { var host = new HExample(); var s = host.Str(); var i = host.Int(); host.Add(); host.Find(); host.Remove(); host.Try = true; } catch (Exception e) { Console.WriteLine(e.Message); } // EExample try { var empty = new EExample(); empty.Add("Item"); empty.Remove(empty.Find("Item")); } catch (ExampleNotImplentedException e) { Console.WriteLine(e.Message); } catch (Exception e) { Console.WriteLine(e.Message); } // MEXample try { var mockOK = new MExample { Run = RunType.SUCCESS, Arrange = true, Test = true, Assert = true }; var mockERROR = new MExample { Run = RunType.EXCEPTION, ExceptionExpected = new ExampleAlreadyExistsException("Mock ERROR"), Throws = true, Arrange = true, Test = true, Assert = true }; } catch (Exception e) { Console.WriteLine(e.Message); } Console.ReadLine(); }
public void MExample() { var mock = new MExample(); }