public void Test() { Assert.That(() => { SimpleFile.Clear(); return(SimpleFile.Write("")); }, Throws.Nothing); }
public void Test() { Runner.RunGeneric(() => { SimpleFile.Clear(); return(SimpleFile.Write("")); }); }
public void Test() { Runner.Run(s => { SimpleFile.Clear(); SimpleFile.Write(""); }); }
public void Test() { Assert.DoesNotThrow(() => { SimpleFile.Clear(); SimpleFile.Read(); }); }
public void Test() { void Read() { SimpleFile.Clear(); SimpleFile.Read(); } Read(); }
public bool MultipleReturns(bool value) { SimpleFile.Clear(); if (value) { return(SimpleFile.Write("A")); } else { return(SimpleFile.Write("B")); } }
public void MultipleVoid(bool value) { SimpleFile.Clear(); if (value) { SimpleFile.Read(); } else { SimpleFile.Read(); } }
public void MultipleWithDoesNotThrow() { Assert.Multiple(() => { Assert.DoesNotThrow(() => SimpleFile.Read()); Assert.DoesNotThrow(() => SimpleFile.Read(), "test"); }); Assert.Multiple(() => { Assert.DoesNotThrow(() => SimpleFile.Read()); Assert.DoesNotThrow(() => SimpleFile.Clear(), "test"); }); Assert.Multiple(() => { Assert.DoesNotThrow(() => SimpleFile.Clear()); Assert.DoesNotThrow(() => SimpleFile.Clear(), "test"); }); }
public void That() { Assert.That(() => Console.WriteLine(""), Throws.Nothing); Assert.That(() => SimpleFile.Clear(), Throws.Nothing); Assert.That(() => Read(), Throws.Nothing); }
public void Test2() { SimpleFile.Clear(); SimpleFile.Read(); }
public void Test() { SimpleFile.Clear(); }