public void WhenYouAddToStaticInt_AllReferencesEffected() { var intHolder = new StaticVsNonStatic(); StaticVsNonStatic.StaticIndex++; Assert.Equal(1, intHolder.GetStaticIndex()); }
public void WhenYouAddToNonStaticInt_OnlyEffectsThatInstance() { var intHolder1 = new StaticVsNonStatic(); var intHolder2 = new StaticVsNonStatic(); intHolder1.NonStaticIndex++; Assert.NotEqual(intHolder1.NonStaticIndex, intHolder2.NonStaticIndex); }